Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcrypto Do the CPU-specific optimization flags a bette...



details:   https://anonhg.NetBSD.org/src/rev/98121836d6ed
branches:  trunk
changeset: 514741:98121836d6ed
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Sep 10 02:56:57 2001 +0000

description:
Do the CPU-specific optimization flags a better way, suggested
by Simon Burge.

diffstat:

 lib/libcrypto/arch/alpha/des.inc   |   5 +++++
 lib/libcrypto/arch/i386/bf.inc     |   4 +++-
 lib/libcrypto/arch/i386/des.inc    |   5 +++++
 lib/libcrypto/arch/mips/bf.inc     |   5 +++++
 lib/libcrypto/arch/mips/des.inc    |   5 +++++
 lib/libcrypto/arch/powerpc/des.inc |   5 +++++
 lib/libcrypto/arch/sparc/bf.inc    |   5 +++++
 lib/libcrypto/arch/sparc/des.inc   |   5 +++++
 lib/libcrypto/arch/sparc64/des.inc |   5 +++++
 lib/libcrypto/bf.inc               |   9 +--------
 lib/libcrypto/des.inc              |  15 +--------------
 11 files changed, 45 insertions(+), 23 deletions(-)

diffs (141 lines):

diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/alpha/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/alpha/des.inc  Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.1 2001/09/10 02:56:57 thorpej Exp $
+
+CPPFLAGS+=     -DDES_RISC2 -DDES_PTR
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/i386/bf.inc
--- a/lib/libcrypto/arch/i386/bf.inc    Mon Sep 10 02:21:42 2001 +0000
+++ b/lib/libcrypto/arch/i386/bf.inc    Mon Sep 10 02:56:57 2001 +0000
@@ -1,10 +1,12 @@
-#      $NetBSD: bf.inc,v 1.1 2000/07/31 18:39:04 thorpej Exp $
+#      $NetBSD: bf.inc,v 1.2 2001/09/10 02:56:58 thorpej Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
 #      SRCS extracted from /home/current/src/lib/libcrypto/../../crypto/dist/openssl/crypto/bf/Makefile.ssl
 #
 
+CPPFLAGS+=     -DBF_PTR2
+
 .PATH: ${OPENSSLSRC}/crypto/bf
 .PATH: ${.CURDIR}/arch/i386
 
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/i386/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/i386/des.inc   Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.3 2001/09/10 02:56:58 thorpej Exp $
+
+CPPFLAGS+=     -DDES_UNROLL -DDES_RISC2 -DDES_PTR
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/mips/bf.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/mips/bf.inc    Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: bf.inc,v 1.1 2001/09/10 02:56:58 thorpej Exp $
+
+CPPFLAGS+=     -DBF_PTR
+
+.include "${.CURDIR}/bf.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/mips/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/mips/des.inc   Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.1 2001/09/10 02:56:59 thorpej Exp $
+
+CPPFLAGS+=     -DDES_UNROLL -DDES_RISC2 -DDES_PTR
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/powerpc/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/powerpc/des.inc        Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.1 2001/09/10 02:56:59 thorpej Exp $
+
+CPPFLAGS+=     -DDES_UNROLL
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/sparc/bf.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/sparc/bf.inc   Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: bf.inc,v 1.1 2001/09/10 02:56:59 thorpej Exp $
+
+CPPFLAGS+=     -DBF_PTR
+
+.include "${.CURDIR}/bf.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/sparc/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/sparc/des.inc  Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.1 2001/09/10 02:57:00 thorpej Exp $
+
+CPPFLAGS+=     -DDES_UNROLL
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/arch/sparc64/des.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcrypto/arch/sparc64/des.inc        Mon Sep 10 02:56:57 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: des.inc,v 1.1 2001/09/10 02:57:00 thorpej Exp $
+
+CPPFLAGS+=     -DDES_UNROLL -DDES_RISC1 -DDES_PTR
+
+.include "${.CURDIR}/des.inc"
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/bf.inc
--- a/lib/libcrypto/bf.inc      Mon Sep 10 02:21:42 2001 +0000
+++ b/lib/libcrypto/bf.inc      Mon Sep 10 02:56:57 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bf.inc,v 1.4 2001/09/09 21:22:09 tls Exp $
+#      $NetBSD: bf.inc,v 1.5 2001/09/10 02:56:57 thorpej Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,13 +9,6 @@
 
 CPPFLAGS+=     -I${OPENSSLSRC}/crypto/bf
 
-.if (${MACHINE_CPU} == "i386")
-CPPFLAGS+=      -DBF_PTR2
-.endif
-.if (${MACHINE_CPU} == "sparc" || ${MACHINE_CPU} == "mips") 
-CPPFLAGS+=      -DBF_PTR
-.endif
-
 SRCS+=bf_skey.c bf_ecb.c   bf_enc.c  bf_cfb64.c bf_ofb64.c
 
 
diff -r 5b1764f24f3f -r 98121836d6ed lib/libcrypto/des.inc
--- a/lib/libcrypto/des.inc     Mon Sep 10 02:21:42 2001 +0000
+++ b/lib/libcrypto/des.inc     Mon Sep 10 02:56:57 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: des.inc,v 1.7 2001/09/09 21:22:09 tls Exp $
+#      $NetBSD: des.inc,v 1.8 2001/09/10 02:56:57 thorpej Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,19 +9,6 @@
 
 CPPFLAGS+=     -I${OPENSSLSRC}/crypto/des
 
-.if (${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "i386")
-CPPFLAGS+=     -DDES_UNROLL -DDES_RISC2 -DDES_PTR
-.endif
-.if (${MACHINE_CPU} == "sparc64")
-CPPFLAGS+=     -DDES_UNROLL -DDES_RISC1 -DDES_PTR
-.endif
-.if (${MACHINE_CPU} == "alpha")
-CPPFLAGS+=     -DDES_RISC2 -DDES_PTR
-.endif
-.if (${MACHINE_CPU} == "powerpc" || ${MACHINE_ARCH} == "sparc")
-CPPFLAGS+=     -DDES_UNROLL
-.endif
-
 SRCS+= cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
        ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
        fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \



Home | Main Index | Thread Index | Old Index