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 regen
details: https://anonhg.NetBSD.org/src/rev/20d0f68bb4d5
branches: trunk
changeset: 320877:20d0f68bb4d5
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 04 00:59:44 2018 +0000
description:
regen
diffstat:
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/Makefile | 18 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes-mips.S | 1835 ++++++
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc | 6 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc | 5 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc | 6 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips-mont.S | 282 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S | 2159 +++++++
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc | 4 +
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha1-mips.S | 2979 ++++++++++
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha512-mips.S | 2979 ++++++++++
10 files changed, 10273 insertions(+), 0 deletions(-)
diffs (truncated from 10313 to 300 lines):
diff -r ae296697efc3 -r 20d0f68bb4d5 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/Makefile Sun Mar 04 00:59:44 2018 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2018/03/04 00:59:44 christos Exp $
+
+.include "bsd.own.mk"
+
+CRYPTODIST=${NETBSDSRCDIR}/crypto
+.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
+
+regen:
+ # poly is mips64 only
+ for i in $$(find ${OPENSSLSRC} -name \*mips\*.pl); \
+ do \
+ case $$i in \
+ (*poly*);; \
+ (*) perl -I${OPENSSLSRC}/crypto/perlasm \
+ -I${OPENSSLSRC}/crypto/bn/asm $$i linux /dev/stdout \
+ > $$(basename $$i .pl).S;; \
+ esac; \
+ done
diff -r ae296697efc3 -r 20d0f68bb4d5 crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes-mips.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes-mips.S Sun Mar 04 00:59:44 2018 +0000
@@ -0,0 +1,1835 @@
+.text
+#ifdef OPENSSL_FIPSCANISTER
+# include <openssl/fipssyms.h>
+#endif
+
+#if defined(__mips_smartmips) && !defined(_MIPS_ARCH_MIPS32R2)
+#define _MIPS_ARCH_MIPS32R2
+#endif
+
+#if !defined(__mips_eabi) && (!defined(__vxworks) || defined(__pic__))
+.option pic2
+#endif
+.set noat
+.align 5
+.ent _mips_AES_encrypt
+_mips_AES_encrypt:
+ .frame $29,0,$31
+ .set reorder
+ lw $12,0($6)
+ lw $13,4($6)
+ lw $14,8($6)
+ lw $15,12($6)
+ lw $30,240($6)
+ add $3,$6,16
+
+ xor $8,$12
+ xor $9,$13
+ xor $10,$14
+ xor $11,$15
+
+ sub $30,1
+#if defined(__mips_smartmips)
+ ext $1,$9,8,8
+.Loop_enc:
+ ext $2,$10,8,8
+ ext $24,$11,8,8
+ ext $25,$8,8,8
+ lwxs $12,$1($7) # Te1[s1>>16]
+ ext $1,$10,16,8
+ lwxs $13,$2($7) # Te1[s2>>16]
+ ext $2,$11,16,8
+ lwxs $14,$24($7) # Te1[s3>>16]
+ ext $24,$8,16,8
+ lwxs $15,$25($7) # Te1[s0>>16]
+ ext $25,$9,16,8
+
+ lwxs $16,$1($7) # Te2[s2>>8]
+ ext $1,$11,24,8
+ lwxs $17,$2($7) # Te2[s3>>8]
+ ext $2,$8,24,8
+ lwxs $18,$24($7) # Te2[s0>>8]
+ ext $24,$9,24,8
+ lwxs $19,$25($7) # Te2[s1>>8]
+ ext $25,$10,24,8
+
+ lwxs $20,$1($7) # Te3[s3]
+ ext $1,$8,0,8
+ lwxs $21,$2($7) # Te3[s0]
+ ext $2,$9,0,8
+ lwxs $22,$24($7) # Te3[s1]
+ ext $24,$10,0,8
+ lwxs $23,$25($7) # Te3[s2]
+ ext $25,$11,0,8
+
+ rotr $12,$12,24
+ rotr $13,$13,24
+ rotr $14,$14,24
+ rotr $15,$15,24
+
+ rotr $16,$16,16
+ rotr $17,$17,16
+ rotr $18,$18,16
+ rotr $19,$19,16
+
+ xor $12,$16
+ lwxs $16,$1($7) # Te0[s0>>24]
+ xor $13,$17
+ lwxs $17,$2($7) # Te0[s1>>24]
+ xor $14,$18
+ lwxs $18,$24($7) # Te0[s2>>24]
+ xor $15,$19
+ lwxs $19,$25($7) # Te0[s3>>24]
+
+ rotr $20,$20,8
+ lw $8,0($3)
+ rotr $21,$21,8
+ lw $9,4($3)
+ rotr $22,$22,8
+ lw $10,8($3)
+ rotr $23,$23,8
+ lw $11,12($3)
+
+ xor $12,$20
+ xor $13,$21
+ xor $14,$22
+ xor $15,$23
+
+ xor $12,$16
+ xor $13,$17
+ xor $14,$18
+ xor $15,$19
+
+ sub $30,1
+ add $3,16
+ xor $8,$12
+ xor $9,$13
+ xor $10,$14
+ xor $11,$15
+ .set noreorder
+ bnez $30,.Loop_enc
+ ext $1,$9,8,8
+
+ srl $1,$9,6
+#else
+ srl $1,$9,6
+.Loop_enc:
+ srl $2,$10,6
+ srl $24,$11,6
+ srl $25,$8,6
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+#if defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_MIPS64R2)
+ lw $12,0($1) # Te1[s1>>16]
+ srl $1,$10,14
+ lw $13,0($2) # Te1[s2>>16]
+ srl $2,$11,14
+ lw $14,0($24) # Te1[s3>>16]
+ srl $24,$8,14
+ lw $15,0($25) # Te1[s0>>16]
+ srl $25,$9,14
+#else
+ lwl $12,2($1) # Te1[s1>>16]
+ lwl $13,2($2) # Te1[s2>>16]
+ lwl $14,2($24) # Te1[s3>>16]
+ lwl $15,2($25) # Te1[s0>>16]
+ lwr $12,3($1) # Te1[s1>>16]
+ srl $1,$10,14
+ lwr $13,3($2) # Te1[s2>>16]
+ srl $2,$11,14
+ lwr $14,3($24) # Te1[s3>>16]
+ srl $24,$8,14
+ lwr $15,3($25) # Te1[s0>>16]
+ srl $25,$9,14
+#endif
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+#if defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_MIPS64R2)
+ rotr $12,$12,24
+ rotr $13,$13,24
+ rotr $14,$14,24
+ rotr $15,$15,24
+# if defined(_MIPSEL)
+ lw $16,0($1) # Te2[s2>>8]
+ srl $1,$11,22
+ lw $17,0($2) # Te2[s3>>8]
+ srl $2,$8,22
+ lw $18,0($24) # Te2[s0>>8]
+ srl $24,$9,22
+ lw $19,0($25) # Te2[s1>>8]
+ srl $25,$10,22
+
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+ lw $20,0($1) # Te3[s3]
+ ins $1,$8,2,8
+ lw $21,0($2) # Te3[s0]
+ ins $2,$9,2,8
+ lw $22,0($24) # Te3[s1]
+ ins $24,$10,2,8
+ lw $23,0($25) # Te3[s2]
+ ins $25,$11,2,8
+# else
+ lw $16,0($1) # Te2[s2>>8]
+ ins $1,$11,2,8
+ lw $17,0($2) # Te2[s3>>8]
+ ins $2,$8,2,8
+ lw $18,0($24) # Te2[s0>>8]
+ ins $24,$9,2,8
+ lw $19,0($25) # Te2[s1>>8]
+ ins $25,$10,2,8
+
+ lw $20,0($1) # Te3[s3]
+ sll $1,$8,2
+ lw $21,0($2) # Te3[s0]
+ sll $2,$9,2
+ lw $22,0($24) # Te3[s1]
+ sll $24,$10,2
+ lw $23,0($25) # Te3[s2]
+ sll $25,$11,2
+
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+# endif
+ rotr $16,$16,16
+ rotr $17,$17,16
+ rotr $18,$18,16
+ rotr $19,$19,16
+
+ rotr $20,$20,8
+ rotr $21,$21,8
+ rotr $22,$22,8
+ rotr $23,$23,8
+#else
+ lwl $16,1($1) # Te2[s2>>8]
+ lwl $17,1($2) # Te2[s3>>8]
+ lwl $18,1($24) # Te2[s0>>8]
+ lwl $19,1($25) # Te2[s1>>8]
+ lwr $16,2($1) # Te2[s2>>8]
+ srl $1,$11,22
+ lwr $17,2($2) # Te2[s3>>8]
+ srl $2,$8,22
+ lwr $18,2($24) # Te2[s0>>8]
+ srl $24,$9,22
+ lwr $19,2($25) # Te2[s1>>8]
+ srl $25,$10,22
+
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+ lwl $20,0($1) # Te3[s3]
+ lwl $21,0($2) # Te3[s0]
+ lwl $22,0($24) # Te3[s1]
+ lwl $23,0($25) # Te3[s2]
+ lwr $20,1($1) # Te3[s3]
+ sll $1,$8,2
+ lwr $21,1($2) # Te3[s0]
+ sll $2,$9,2
+ lwr $22,1($24) # Te3[s1]
+ sll $24,$10,2
+ lwr $23,1($25) # Te3[s2]
+ sll $25,$11,2
+
+ and $1,0x3fc
+ and $2,0x3fc
+ and $24,0x3fc
+ and $25,0x3fc
+ add $1,$7
+ add $2,$7
+ add $24,$7
+ add $25,$7
+#endif
+ xor $12,$16
+ lw $16,0($1) # Te0[s0>>24]
+ xor $13,$17
+ lw $17,0($2) # Te0[s1>>24]
Home |
Main Index |
Thread Index |
Old Index