Module Name:    src
Committed By:   christos
Date:           Mon Apr 26 18:06:09 UTC 2021

Modified Files:
        src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: aes.inc bn.inc
            crypto.inc poly1305.inc sha.inc
Added Files:
        src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.inc

Log Message:
Centralize the logic for endian and 64 bit availability.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
cvs rdiff -u -r1.6 -r1.7 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
cvs rdiff -u -r1.7 -r1.8 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
cvs rdiff -u -r0 -r1.1 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
cvs rdiff -u -r1.4 -r1.5 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.5	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc	Mon Apr 26 14:06:09 2021
@@ -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
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.6	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc	Mon Apr 26 14:06:09 2021
@@ -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"
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.6	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc	Mon Apr 26 14:06:09 2021
@@ -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"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.8
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7	Mon Sep 24 07:03:40 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc	Mon Apr 26 14:06:09 2021
@@ -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"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.4	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc	Mon Apr 26 14:06:09 2021
@@ -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_SRCS = poly1305-mips64.S
 POLY1305_CPPFLAGS+=-DPOLY1305_ASM
 
 .endif
-.endif
 
 .include "../../poly1305.inc"

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc:1.1
--- /dev/null	Mon Apr 26 14:06:09 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc	Mon Apr 26 14:06:09 2021
@@ -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

Reply via email to