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/dist/crypto When loading a globa...
details: https://anonhg.NetBSD.org/src/rev/8d55db9e71f2
branches: trunk
changeset: 338517:8d55db9e71f2
user: joerg <joerg%NetBSD.org@localhost>
date: Thu May 28 19:13:32 2015 +0000
description:
When loading a global variable from the GOT, it must be dereferenced to
obtain the actual value. Adjust various tests to extract the correct bits.
diffstat:
crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-x86_64.pl | 4 +-
crypto/external/bsd/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl | 10 ++----
crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl | 2 +-
crypto/external/bsd/openssl/dist/crypto/rc4/asm/rc4-x86_64.pl | 8 ++--
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-x86_64.pl | 15 ++++------
5 files changed, 16 insertions(+), 23 deletions(-)
diffs (111 lines):
diff -r 3b3b1d07ba09 -r 8d55db9e71f2 crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-x86_64.pl
--- a/crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-x86_64.pl Thu May 28 17:31:38 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-x86_64.pl Thu May 28 19:13:32 2015 +0000
@@ -1679,12 +1679,12 @@
lea .LAES_Td(%rip),$sbox
.Lcbc_picked_te:
- mov OPENSSL_ia32cap_P(%rip),%r10d
+ mov OPENSSL_ia32cap_P(%rip),%r10
cmp \$$speed_limit,%rdx
jb .Lcbc_slow_prologue
test \$15,%rdx
jnz .Lcbc_slow_prologue
- bt \$28,%r10d
+ bt \$28,(%r10)
jc .Lcbc_slow_prologue
# allocate aligned stack frame...
diff -r 3b3b1d07ba09 -r 8d55db9e71f2 crypto/external/bsd/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl
--- a/crypto/external/bsd/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 28 17:31:38 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl Thu May 28 19:13:32 2015 +0000
@@ -89,15 +89,11 @@
.align 16
aesni_cbc_sha1_enc:
# caller should check for SSSE3 and AES-NI bits
- mov OPENSSL_ia32cap_P+0(%rip),%r10d
- mov OPENSSL_ia32cap_P+4(%rip),%r11d
+ mov OPENSSL_ia32cap_P(%rip),%r10
___
$code.=<<___ if ($avx);
- and \$`1<<28`,%r11d # mask AVX bit
- and \$`1<<30`,%r10d # mask "Intel CPU" bit
- or %r11d,%r10d
- cmp \$`1<<28|1<<30`,%r10d
- je aesni_cbc_sha1_enc_avx
+ bt \$28, 4(%r10)
+ jc aesni_cbc_sha1_enc_avx
___
$code.=<<___;
jmp aesni_cbc_sha1_enc_ssse3
diff -r 3b3b1d07ba09 -r 8d55db9e71f2 crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
--- a/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl Thu May 28 17:31:38 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl Thu May 28 19:13:32 2015 +0000
@@ -168,7 +168,7 @@
.align 16
bn_GF2m_mul_2x2:
mov OPENSSL_ia32cap_P(%rip),%rax
- bt \$33,%rax
+ bt \$1,4(%rax)
jnc .Lvanilla_mul_2x2
movq $a1,%xmm0
diff -r 3b3b1d07ba09 -r 8d55db9e71f2 crypto/external/bsd/openssl/dist/crypto/rc4/asm/rc4-x86_64.pl
--- a/crypto/external/bsd/openssl/dist/crypto/rc4/asm/rc4-x86_64.pl Thu May 28 17:31:38 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/rc4/asm/rc4-x86_64.pl Thu May 28 19:13:32 2015 +0000
@@ -158,7 +158,7 @@
mov -4($dat),$YY#b
cmpl \$-1,256($dat)
je .LRC4_CHAR
- mov OPENSSL_ia32cap_P(%rip),%r8d
+ mov OPENSSL_ia32cap_P(%rip),%r8
xor $TX[1],$TX[1]
inc $XX[0]#b
sub $XX[0],$TX[1]
@@ -166,7 +166,7 @@
movl ($dat,$XX[0],4),$TX[0]#d
test \$-16,$len
jz .Lloop1
- bt \$30,%r8d # Intel CPU?
+ bt \$30,(%r8) # Intel CPU?
jc .Lintel
and \$7,$TX[1]
lea 1($XX[0]),$XX[1]
@@ -443,8 +443,8 @@
xor %r10,%r10
xor %r11,%r11
- mov OPENSSL_ia32cap_P(%rip),$idx#d
- bt \$20,$idx#d # RC4_CHAR?
+ mov OPENSSL_ia32cap_P(%rip),$idx
+ bt \$20,($idx) # RC4_CHAR?
jc .Lc1stloop
jmp .Lw1stloop
diff -r 3b3b1d07ba09 -r 8d55db9e71f2 crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-x86_64.pl
--- a/crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-x86_64.pl Thu May 28 17:31:38 2015 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-x86_64.pl Thu May 28 19:13:32 2015 +0000
@@ -221,17 +221,14 @@
.type sha1_block_data_order,\@function,3
.align 16
sha1_block_data_order:
- mov OPENSSL_ia32cap_P+0(%rip),%r9d
- mov OPENSSL_ia32cap_P+4(%rip),%r8d
- test \$`1<<9`,%r8d # check SSSE3 bit
- jz .Lialu
+ mov OPENSSL_ia32cap_P+0(%rip),%r8
+ mov 4(%r8),%r8d
+ bt \$9,%r8d
+ jnc .Lialu
___
$code.=<<___ if ($avx);
- and \$`1<<28`,%r8d # mask AVX bit
- and \$`1<<30`,%r9d # mask "Intel CPU" bit
- or %r9d,%r8d
- cmp \$`1<<28|1<<30`,%r8d
- je _avx_shortcut
+ bt \$28,%r8d
+ jc _avx_shortcut
___
$code.=<<___;
jmp _ssse3_shortcut
Home |
Main Index |
Thread Index |
Old Index