Source-Changes-HG archive

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

[src/trunk]: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips Centrali...



details:   https://anonhg.NetBSD.org/src/rev/38e642763798
branches:  trunk
changeset: 961985:38e642763798
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Apr 26 18:06:09 2021 +0000

description:
Centralize the logic for endian and 64 bit availability.

diffstat:

 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc      |   5 +-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc       |   6 ++-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc   |   6 ++-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc     |  17 ++++++++++
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc |   6 +-
 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc      |   9 +++-
 6 files changed, 37 insertions(+), 12 deletions(-)

diffs (103 lines):

diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc       Mon Apr 26 17:24:04 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc       Mon Apr 26 18:06:09 2021 +0000
@@ -1,7 +1,8 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-#AES_SRCS = aes-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+#AES_SRCS = aes-mips${MIPS_64}.S
 #AESCPPFLAGS = -DAES_ASM
 .endif
 
diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc        Mon Apr 26 17:24:04 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc        Mon Apr 26 18:06:09 2021 +0000
@@ -1,7 +1,9 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-BN_SRCS = mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+BN_SRCS = mips${MIPS_64}.S
 .endif
 
 .include "../../bn.inc"
diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc    Mon Apr 26 17:24:04 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc    Mon Apr 26 18:06:09 2021 +0000
@@ -1,7 +1,9 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-CRYPTO_SRCS += mips-mont${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+CRYPTO_SRCS += mips-mont${MIPS_64}.S
 .endif
 
 .include "../../crypto.inc"
diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc      Mon Apr 26 18:06:09 2021 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: mips.inc,v 1.1 2021/04/26 18:06:09 christos Exp $
+
+.ifndef MIPS_LE
+
+.      if empty(MACHINE_ARCH:M*el)
+MIPS_LE=0
+.      else
+MIPS_LE=1
+.      endif
+
+.      if empty(MACHINE_ARCH:Mmips*64*)
+MIPS_64=
+.      else
+MIPS_64=64
+.      endif
+
+.endif
diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc  Mon Apr 26 17:24:04 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc  Mon Apr 26 18:06:09 2021 +0000
@@ -1,5 +1,6 @@
-.if empty(MACHINE_ARCH:M*eb)
-.if !empty(MACHINE_ARCH:Mmips64*)
+.include "mips.inc"
+
+.if ${MIPS_LE} && ${MIPS_64} == "64"
 
 .PATH.S: ${.PARSEDIR}
 
@@ -7,6 +8,5 @@
 POLY1305_CPPFLAGS+=-DPOLY1305_ASM
 
 .endif
-.endif
 
 .include "../../poly1305.inc"
diff -r 52953fb9ccc2 -r 38e642763798 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc       Mon Apr 26 17:24:04 2021 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc       Mon Apr 26 18:06:09 2021 +0000
@@ -1,9 +1,12 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-SHA_SRCS += sha1-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
-SHA_SRCS += sha512-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+SHA_SRCS += sha1-mips${MIPS_64}.S
+SHA_SRCS += sha512-mips${MIPS_64}.S
 
 SHACPPFLAGS = -DSHA1_ASM
 .endif
+
 .include "../../sha.inc"



Home | Main Index | Thread Index | Old Index