Module Name: src Committed By: martin Date: Sun Aug 15 08:58:56 UTC 2021
Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips [netbsd-9]: aes.inc bn.inc crypto.inc poly1305.inc sha.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc [netbsd-9]: bn.inc Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips [netbsd-9]: mips.inc Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1336): crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc: revision 1.1 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc: revision 1.2 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc: revision 1.7 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc: revision 1.5 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc: revision 1.8 crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc: revision 1.3 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc: revision 1.8 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc: revision 1.6 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc: revision 1.7 Centralize the logic for endian and 64 bit availability. Handle the compat builds and both the n64 and non n64 variants PR/56318: Izumi Tsutsui: Limit bn-sparcv8.S to sparc64; breaks on sparcstation 2 (sun4c) PR/56318: Izumi Tsutsui: Don't include mips.S for 32 bit mips because it does not work for mips1 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc cvs rdiff -u -r1.6 -r1.6.4.1 \ 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.7.2.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc cvs rdiff -u -r0 -r1.2.6.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc cvs rdiff -u -r1.4 -r1.4.4.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc cvs rdiff -u -r1.1.38.1 -r1.1.38.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.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.5.4.1 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.5 Fri Mar 9 21:49:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc Sun Aug 15 08:58:56 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.6.4.1 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.6 Fri Mar 9 21:49:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc Sun Aug 15 08:58:56 2021 @@ -1,7 +1,10 @@ -.if empty(MACHINE_ARCH:M*eb) +.include "mips.inc" + +# Don't include mips.S for 32 bit mips because it does not work for mips1 +.if ${MIPS_LE} && ${MIPS_64} == "64" .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.6.4.1 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.6 Fri Mar 9 21:49:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc Sun Aug 15 08:58:56 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.7.2.1 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7 Mon Sep 24 11:03:40 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc Sun Aug 15 08:58:56 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.4.4.1 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.4 Fri Mar 9 21:49:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc Sun Aug 15 08:58:56 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" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1.38.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1.38.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1.38.1 Sun Mar 28 18:21:45 2021 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc Sun Aug 15 08:58:56 2021 @@ -1,5 +1,8 @@ .PATH.S: ${.PARSEDIR} +# Limit bn-sparcv8.S to sparc64; breaks on sparcstation 2 (sun4c) +.if ${MACHINE} == "sparc64" # XXX bn-sparcv8plus.S doesn't work well. why? BN_SRCS = bn-sparcv8.S AFLAGS.bn-sparcv8.S+= -Wa,-Av9 +.endif .include "../../bn.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.2.6.2 --- /dev/null Sun Aug 15 08:58:56 2021 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc Sun Aug 15 08:58:55 2021 @@ -0,0 +1,18 @@ +# $NetBSD: mips.inc,v 1.2.6.2 2021/08/15 08:58:55 martin Exp $ + +.ifndef MIPS_LE + +. if empty(MACHINE_ARCH:M*el) +MIPS_LE=0 +. else +MIPS_LE=1 +. endif + +. if (!empty(MACHINE_ARCH:Mmipsn64*) && empty(COPTS:M-mabi=*32*)) || \ + (!empty(MACHINE_ARCH:Mmips64*) && !empty(COPTS:M-mabi=*64*)) +MIPS_64=64 +. else +MIPS_64= +. endif + +.endif