Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-06-20 23:00:00 +0400
committerAdam Langley <agl@chromium.org>2014-06-21 00:17:32 +0400
commit520ed0446ca99e229c5de06e5bd99056c5b6c4c4 (patch)
treea17c40ed5a84b6ec66afa3c7501b08bfe97a389c /crypto/rc4
parentb2ce05839b435bb21fe70acd0fc00abfa918f41e (diff)
GOT-relative lookups in RC4 code.
Diffstat (limited to 'crypto/rc4')
-rw-r--r--crypto/rc4/asm/rc4-x86_64.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/rc4/asm/rc4-x86_64.pl b/crypto/rc4/asm/rc4-x86_64.pl
index c7da8fa1..a5b2216a 100644
--- a/crypto/rc4/asm/rc4-x86_64.pl
+++ b/crypto/rc4/asm/rc4-x86_64.pl
@@ -158,7 +158,8 @@ $code.=<<___;
mov -4($dat),$YY#b
cmpl \$-1,256($dat)
je .LRC4_CHAR
- mov OPENSSL_ia32cap_P(%rip),%r8d
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%r8
+ mov (%r8),%r8d
xor $TX[1],$TX[1]
inc $XX[0]#b
sub $XX[0],$TX[1]
@@ -443,7 +444,8 @@ RC4_set_key:
xor %r10,%r10
xor %r11,%r11
- mov OPENSSL_ia32cap_P(%rip),$idx#d
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx
+ mov ($idx),$idx#d
bt \$20,$idx#d # RC4_CHAR?
jc .Lc1stloop
jmp .Lw1stloop
@@ -507,7 +509,8 @@ RC4_set_key:
.align 16
RC4_options:
lea .Lopts(%rip),%rax
- mov OPENSSL_ia32cap_P(%rip),%edx
+ mov OPENSSL_ia32cap_P(%rip),%rdx
+ mov (%rdx),%edx
bt \$20,%edx
jc .L8xchar
bt \$30,%edx