16557Sfr41279# 26557Sfr41279# CDDL HEADER START 36557Sfr41279# 46557Sfr41279# The contents of this file are subject to the terms of the 56557Sfr41279# Common Development and Distribution License (the "License"). 66557Sfr41279# You may not use this file except in compliance with the License. 76557Sfr41279# 86557Sfr41279# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96557Sfr41279# or http://www.opensolaris.org/os/licensing. 106557Sfr41279# See the License for the specific language governing permissions 116557Sfr41279# and limitations under the License. 126557Sfr41279# 136557Sfr41279# When distributing Covered Code, include this CDDL HEADER in each 146557Sfr41279# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156557Sfr41279# If applicable, add the following below this CDDL HEADER, with the 166557Sfr41279# fields enclosed by brackets "[]" replaced with your own identifying 176557Sfr41279# information: Portions Copyright [yyyy] [name of copyright owner] 186557Sfr41279# 196557Sfr41279# CDDL HEADER END 206557Sfr41279# 216557Sfr41279# 22*8933Sopensolaris@drydog.com# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 236557Sfr41279# Use is subject to license terms. 246557Sfr41279# 256557Sfr41279# Configuration and targets for bignum module 266557Sfr41279# specific to AMD 64-bit architecture, amd64. 276557Sfr41279# 286557Sfr41279# Bignum configuration (BIGNUM_CFG): 296557Sfr41279# PSR_MUL: 306557Sfr41279# There is a processor-specific implementation bignum multiply functions 316557Sfr41279# HWCAP: 326557Sfr41279# There are multiple implementations of bignum functions, and the 336557Sfr41279# appropriate one must be chosen at run time, based on testing 346557Sfr41279# hardware capabilites. 356557Sfr41279# 366557Sfr41279# -DPSR_MUL: 376557Sfr41279# For AMD64, there is a processor-specific implementation of 386557Sfr41279# the bignum multiply functions, which takes advantage of the 396557Sfr41279# 64x64->128 bit multiply instruction. 406557Sfr41279# 416557Sfr41279# -UHWCAP: 426557Sfr41279# There is only one implementation, because the 128 bit multiply using 436557Sfr41279# general-purpose registers is faster than any MMX or SSE2 implementation. 446557Sfr41279 456557Sfr41279BIGNUM_CFG = -DPSR_MUL 46*8933Sopensolaris@drydog.comCFLAGS += -xO4 -xcrossfile 476557Sfr41279$(OBJS_DIR)/bignumimpl.o $(LINTS_DIR)/bignumimpl.ln := \ 486557Sfr41279 CPPFLAGS += $(BIGNUM_CFG) 496557Sfr41279$(OBJS_DIR)/bignum_amd64.o $(LINTS_DIR)/bignum_amd64.ln := \ 506557Sfr41279 CPPFLAGS += $(BIGNUM_CFG) 516557Sfr41279 526557Sfr41279$(OBJS_DIR)/bignum_amd64.o: $(BIGNUMDIR)/amd64/bignum_amd64.c 53*8933Sopensolaris@drydog.com $(COMPILE.c) -o $@ $(BIGNUM_CFG) $(BIGNUMDIR)/amd64/bignum_amd64.c 546557Sfr41279 $(CTFCONVERT_O) 556557Sfr41279 $(POST_PROCESS_O) 566557Sfr41279 576557Sfr41279$(OBJS_DIR)/bignum_amd64_asm.o: $(BIGNUMDIR)/amd64/bignum_amd64_asm.s 58*8933Sopensolaris@drydog.com $(COMPILE.s) -P -o $@ $(BIGNUM_CFG) \ 59*8933Sopensolaris@drydog.com $(BIGNUMDIR)/amd64/bignum_amd64_asm.s 606557Sfr41279 $(POST_PROCESS_O) 616557Sfr41279 626557Sfr41279$(LINTS_DIR)/bignum_amd64.ln: $(BIGNUMDIR)/amd64/bignum_amd64.c 636557Sfr41279 @($(LHEAD) $(LINT.c) $(BIGNUMDIR)/amd64/bignum_amd64.c $(LTAIL)) 646557Sfr41279 656557Sfr41279$(LINTS_DIR)/bignum_amd64_asm.ln: $(BIGNUMDIR)/amd64/bignum_amd64_asm.s 666557Sfr41279 @($(LHEAD) $(LINT.s) $(BIGNUMDIR)/amd64/bignum_amd64_asm.s $(LTAIL)) 67