1*6557Sfr41279# 2*6557Sfr41279# CDDL HEADER START 3*6557Sfr41279# 4*6557Sfr41279# The contents of this file are subject to the terms of the 5*6557Sfr41279# Common Development and Distribution License (the "License"). 6*6557Sfr41279# You may not use this file except in compliance with the License. 7*6557Sfr41279# 8*6557Sfr41279# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6557Sfr41279# or http://www.opensolaris.org/os/licensing. 10*6557Sfr41279# See the License for the specific language governing permissions 11*6557Sfr41279# and limitations under the License. 12*6557Sfr41279# 13*6557Sfr41279# When distributing Covered Code, include this CDDL HEADER in each 14*6557Sfr41279# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6557Sfr41279# If applicable, add the following below this CDDL HEADER, with the 16*6557Sfr41279# fields enclosed by brackets "[]" replaced with your own identifying 17*6557Sfr41279# information: Portions Copyright [yyyy] [name of copyright owner] 18*6557Sfr41279# 19*6557Sfr41279# CDDL HEADER END 20*6557Sfr41279# 21*6557Sfr41279# 22*6557Sfr41279# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*6557Sfr41279# Use is subject to license terms. 24*6557Sfr41279# 25*6557Sfr41279#ident "%Z%%M% %I% %E% SMI" 26*6557Sfr41279# 27*6557Sfr41279# Configuration and targets for bignum module 28*6557Sfr41279# specific to Intel 32-bit architecture, i386. 29*6557Sfr41279# 30*6557Sfr41279# Bignum configuration (BIGNUM_CFG): 31*6557Sfr41279# PSR_MUL: 32*6557Sfr41279# There is a processor-specific implementation bignum multiply functions 33*6557Sfr41279# HWCAP: 34*6557Sfr41279# There are multiple implementations of bignum functions, and the 35*6557Sfr41279# appropriate one must be chosen at run time, based on testing 36*6557Sfr41279# hardware capabilites. 37*6557Sfr41279# MMX_MANAGE: 38*6557Sfr41279# Multimedia registers must be saved and restored. 39*6557Sfr41279# Normally MMX_MANAGE iff _KERNEL, but for testing purposes, 40*6557Sfr41279# MMX_MANAGE can be defined in userland. 41*6557Sfr41279 42*6557Sfr41279BIGNUM_CFG = -DPSR_MUL -DHWCAP -DMMX_MANAGE 43*6557Sfr41279 44*6557Sfr41279LDFLAGS += -M $(BIGNUMDIR)/i386/cap_mapfile 45*6557Sfr41279 46*6557Sfr41279$(OBJS_DIR)/bignumimpl.o $(LINTS_DIR)/bignumimpl.ln := \ 47*6557Sfr41279 CPPFLAGS += $(BIGNUM_CFG) 48*6557Sfr41279$(OBJS_DIR)/bignum_i386.o $(LINTS_DIR)/bignum_i386.ln := \ 49*6557Sfr41279 CPPFLAGS += $(BIGNUM_CFG) 50*6557Sfr41279 51*6557Sfr41279$(OBJS_DIR)/bignum_i386.o: $(BIGNUMDIR)/i386/bignum_i386.c 52*6557Sfr41279 $(COMPILE.c) -o $@ $(BIGNUMDIR)/i386/bignum_i386.c 53*6557Sfr41279 $(CTFCONVERT_O) 54*6557Sfr41279 $(POST_PROCESS_O) 55*6557Sfr41279 56*6557Sfr41279$(OBJS_DIR)/bignum_i386_asm.o: $(BIGNUMDIR)/i386/bignum_i386_asm.s 57*6557Sfr41279 $(COMPILE.s) -P -o $@ $(BIGNUM_CFG) $(BIGNUMDIR)/i386/bignum_i386_asm.s 58*6557Sfr41279 $(POST_PROCESS_O) 59*6557Sfr41279 60*6557Sfr41279$(LINTS_DIR)/bignum_i386.ln: $(BIGNUMDIR)/i386/bignum_i386.c 61*6557Sfr41279 @($(LHEAD) $(LINT.c) $(BIGNUMDIR)/i386/bignum_i386.c $(LTAIL)) 62*6557Sfr41279 63*6557Sfr41279$(LINTS_DIR)/bignum_i386_asm.ln: $(BIGNUMDIR)/i386/bignum_i386_asm.s 64*6557Sfr41279 @($(LHEAD) $(LINT.s) $(BIGNUMDIR)/i386/bignum_i386_asm.s $(LTAIL)) 65