summaryrefslogtreecommitdiffstats
path: root/crypto/des
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2003-01-03 17:37:53 +0000
committerAndy Polyakov <appro@openssl.org>2003-01-03 17:37:53 +0000
commit3cc9a89dda7165f9363f06db3559c5dea043bb73 (patch)
tree0920468b8b2b0a951d32107856055d6007ff6875 /crypto/des
parent46a0d4fbcb7577dd97e223e90d0a34044d4595d6 (diff)
Unified targets for ELF assembler modules. Tested on Linux, Solaris and
FreeBSD. Goal is to extend support even to SCO5, UnixWare/OpenUnix...
Diffstat (limited to 'crypto/des')
-rw-r--r--crypto/des/Makefile.ssl31
-rw-r--r--crypto/des/asm/crypt586.pl5
-rw-r--r--crypto/des/asm/des-586.pl5
3 files changed, 12 insertions, 29 deletions
diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl
index 93979d497a..149d5a81ec 100644
--- a/crypto/des/Makefile.ssl
+++ b/crypto/des/Makefile.ssl
@@ -77,30 +77,11 @@ 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 \
- `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
- -x c asm/dx86unix.cpp | as -o asm/dx86-elf.o
-
-asm/yx86-elf.o: asm/yx86unix.cpp
- $(CPP) -DELF \
- `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
- -x c asm/yx86unix.cpp | as -o asm/yx86-elf.o
-
-# solaris
-asm/dx86-sol.o: asm/dx86unix.cpp
- $(CC) -E -DSOL \
- `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
- asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
- as -o asm/dx86-sol.o asm/dx86-sol.s
- rm -f asm/dx86-sol.s
-
-asm/yx86-sol.o: asm/yx86unix.cpp
- $(CC) -E -DSOL \
- `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
- asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
- as -o asm/yx86-sol.o asm/yx86-sol.s
- rm -f asm/yx86-sol.s
+asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s)
+
+asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s)
# a.out
asm/dx86-out.o: asm/dx86unix.cpp
@@ -156,7 +137,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/dx86unix.cpp asm/yx86unix.cpp *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/crypto/des/asm/crypt586.pl b/crypto/des/asm/crypt586.pl
index 51fb3ddf26..1d04ed6def 100644
--- a/crypto/des/asm/crypt586.pl
+++ b/crypto/des/asm/crypt586.pl
@@ -32,8 +32,9 @@ sub fcrypt_body
&xor( $R, $R);
# PIC-ification:-)
- if ($cpp) { &picmeup("edx","DES_SPtrans"); }
- else { &lea("edx",&DWP("DES_SPtrans")); }
+ &picmeup("edx","DES_SPtrans");
+ #if ($cpp) { &picmeup("edx","DES_SPtrans"); }
+ #else { &lea("edx",&DWP("DES_SPtrans")); }
&push("edx"); # becomes &swtmp(1)
#
&mov($trans,&wparam(1)); # reloaded with DES_SPtrans in D_ENCRYPT
diff --git a/crypto/des/asm/des-586.pl b/crypto/des/asm/des-586.pl
index 7a58869289..b75d3c6b3a 100644
--- a/crypto/des/asm/des-586.pl
+++ b/crypto/des/asm/des-586.pl
@@ -73,8 +73,9 @@ sub DES_encrypt
}
# PIC-ification:-)
- if ($cpp) { &picmeup($trans,"DES_SPtrans"); }
- else { &lea($trans,&DWP("DES_SPtrans")); }
+ &picmeup($trans,"DES_SPtrans");
+ #if ($cpp) { &picmeup($trans,"DES_SPtrans"); }
+ #else { &lea($trans,&DWP("DES_SPtrans")); }
&mov( "ecx", &wparam(1) );
&cmp("ebx","0");