summaryrefslogtreecommitdiffstats
path: root/crypto/des
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2003-01-02 23:26:46 +0000
committerAndy Polyakov <appro@openssl.org>2003-01-02 23:26:46 +0000
commit28e276f13928d1db9960acf8449a60b9bf6549c6 (patch)
tree9fd8104cdb162ade84e988e2e0696b6c978f8ea0 /crypto/des
parentf22e1e4dd2bf02390385f6cb5bfabe7c5b74b397 (diff)
Complete integration of SPARC assembler DES implementation. Tested on Solaris
only. I'll keep my eyes open for Linux and OpenBSD targets.
Diffstat (limited to 'crypto/des')
-rw-r--r--crypto/des/Makefile.ssl11
-rw-r--r--crypto/des/asm/des_enc.m42
2 files changed, 12 insertions, 1 deletions
diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl
index 2edb542db9..93979d497a 100644
--- a/crypto/des/Makefile.ssl
+++ b/crypto/des/Makefile.ssl
@@ -23,6 +23,14 @@ DES_ENC= des_enc.o fcrypt_b.o
CFLAGS= $(INCLUDES) $(CFLAG)
+# We let the C compiler driver to take care of .s files. This is done in
+# order to be excused from maintaining a separate set of architecture
+# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
+# gcc, then the driver will automatically translate it to -xarch=v8plus
+# and pass it down to assembler.
+AS=$(CC) -c
+ASFLAGS=$(CFLAGS)
+
GENERAL=Makefile
TEST=destest.c
APPS=
@@ -65,6 +73,9 @@ lib: $(LIBOBJ)
des: des.o cbc3_enc.o lib
$(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
+asm/des_enc-sparc.S: asm/des_enc.m4
+ m4 -B 8192 asm/des_enc.m4 > asm/des_enc-sparc.S
+
# elf
asm/dx86-elf.o: asm/dx86unix.cpp
$(CPP) -DELF \
diff --git a/crypto/des/asm/des_enc.m4 b/crypto/des/asm/des_enc.m4
index ab99660ad5..db7eb62138 100644
--- a/crypto/des/asm/des_enc.m4
+++ b/crypto/des/asm/des_enc.m4
@@ -1431,7 +1431,7 @@ DES_decrypt3:
.PIC.me.up:
add out0,%o7,out0 ! pointer to .PIC.me.up
-#ifdef __PIC__
+#ifdef OPENSSL_PIC
sethi %hi(DES_SPtrans),global1
or global1,%lo(DES_SPtrans),global1
sethi %hi(_GLOBAL_OFFSET_TABLE_-(.PIC.me.up-.)),out2