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/x86_64 Get ri...



details:   https://anonhg.NetBSD.org/src/rev/e47539fa0731
branches:  trunk
changeset: 767641:e47539fa0731
user:      jym <jym%NetBSD.org@localhost>
date:      Mon Jul 25 19:11:49 2011 +0000

description:
Get rid of the "rep ret" trick in places where it is not needed. FWIW,
the "rep ret" trick is recommended by AMD as a branch prediction
optimization in certain circumstances (quoting their manual):

- any kind of branch (either conditional or unconditional) that has the
single-byte near-return RET instruction as its target

- a conditional branch that occurs in the code directly before the
single-byte near-return RET instruction.

diffstat:

 crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S |  12 ----------
 1 files changed, 0 insertions(+), 12 deletions(-)

diffs (98 lines):

diff -r ea37a8386390 -r e47539fa0731 crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S      Mon Jul 25 18:23:14 2011 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S      Mon Jul 25 19:11:49 2011 +0000
@@ -18,7 +18,6 @@
        jnz     .Loop_enc1_1    
        aesenclast      %xmm5,%xmm0
        movups  %xmm0,(%rsi)
-       repz
        retq
 .size  aesni_encrypt,.-aesni_encrypt
 
@@ -40,7 +39,6 @@
        jnz     .Loop_dec1_2    
        aesdeclast      %xmm5,%xmm0
        movups  %xmm0,(%rsi)
-       repz
        retq
 .size  aesni_decrypt, .-aesni_decrypt
 .type  _aesni_encrypt3,@function
@@ -74,7 +72,6 @@
        aesenclast      %xmm4,%xmm0
        aesenclast      %xmm4,%xmm1
        aesenclast      %xmm4,%xmm2
-       repz
        retq
 .size  _aesni_encrypt3,.-_aesni_encrypt3
 .type  _aesni_decrypt3,@function
@@ -108,7 +105,6 @@
        aesdeclast      %xmm4,%xmm0
        aesdeclast      %xmm4,%xmm1
        aesdeclast      %xmm4,%xmm2
-       repz
        retq
 .size  _aesni_decrypt3,.-_aesni_decrypt3
 .type  _aesni_encrypt4,@function
@@ -147,7 +143,6 @@
        aesenclast      %xmm4,%xmm1
        aesenclast      %xmm4,%xmm2
        aesenclast      %xmm4,%xmm3
-       repz
        retq
 .size  _aesni_encrypt4,.-_aesni_encrypt4
 .type  _aesni_decrypt4,@function
@@ -186,7 +181,6 @@
        aesdeclast      %xmm4,%xmm1
        aesdeclast      %xmm4,%xmm2
        aesdeclast      %xmm4,%xmm3
-       repz
        retq
 .size  _aesni_decrypt4,.-_aesni_decrypt4
 .globl aesni_ecb_encrypt
@@ -556,7 +550,6 @@
        movaps  %xmm0,(%rdi)
 .Ldec_key_ret:
        addq    $8,%rsp
-       repz
        retq
 .LSEH_end_set_decrypt_key:
 .size  aesni_set_decrypt_key,.-aesni_set_decrypt_key
@@ -679,7 +672,6 @@
        movq    $-2,%rax
 .Lenc_key_ret:
        addq    $8,%rsp
-       repz
        retq
 .LSEH_end_set_encrypt_key:
 
@@ -694,7 +686,6 @@
        pxor    %xmm4,%xmm0
        pshufd  $255,%xmm1,%xmm1
        pxor    %xmm1,%xmm0
-       repz
        retq
 
 .align 16
@@ -715,7 +706,6 @@
        pxor    %xmm1,%xmm0
        pshufd  $255,%xmm0,%xmm3
        pxor    %xmm3,%xmm2
-       repz
        retq
 
 .align 16
@@ -739,7 +729,6 @@
        pxor    %xmm4,%xmm0
        pshufd  $255,%xmm1,%xmm1
        pxor    %xmm1,%xmm0
-       repz
        retq
 
 .align 16
@@ -753,6 +742,5 @@
        pxor    %xmm4,%xmm2
        pshufd  $170,%xmm1,%xmm1
        pxor    %xmm1,%xmm2
-       repz
        retq
 .size  aesni_set_encrypt_key,.-aesni_set_encrypt_key



Home | Main Index | Thread Index | Old Index