diff options
author | Kenny Root <kroot@google.com> | 2015-10-02 16:09:15 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2015-10-02 16:09:49 -0700 |
commit | fe7305364c3369f9222a61646c5c9842eae9bceb (patch) | |
tree | 360ada970b7bb1046ae069d253ba24d9622eb3ad /linux-x86_64/crypto/rand/rdrand-x86_64.S | |
parent | 691ef9d0ff0ece39ffd6a58960a7cd195ef584ae (diff) | |
parent | b452bce3bf2034466cee6206ebf3994409468ee4 (diff) | |
download | external_boringssl-fe7305364c3369f9222a61646c5c9842eae9bceb.zip external_boringssl-fe7305364c3369f9222a61646c5c9842eae9bceb.tar.gz external_boringssl-fe7305364c3369f9222a61646c5c9842eae9bceb.tar.bz2 |
Merge mnc-dr-dev-plus-aosp into mnc-ub-dev
This pulls in the latest version of BoringSSL.
Change-Id: I0ab5c73d60f41a696c9a828fac87670aaca10dec
Diffstat (limited to 'linux-x86_64/crypto/rand/rdrand-x86_64.S')
-rw-r--r-- | linux-x86_64/crypto/rand/rdrand-x86_64.S | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/linux-x86_64/crypto/rand/rdrand-x86_64.S b/linux-x86_64/crypto/rand/rdrand-x86_64.S index 622ae55..94aab9c 100644 --- a/linux-x86_64/crypto/rand/rdrand-x86_64.S +++ b/linux-x86_64/crypto/rand/rdrand-x86_64.S @@ -1,11 +1,48 @@ #if defined(__x86_64__) .text + + + .globl CRYPTO_rdrand .hidden CRYPTO_rdrand .type CRYPTO_rdrand,@function .align 16 CRYPTO_rdrand: -.byte 0x48, 0x0f, 0xc7, 0xf0 + xorq %rax,%rax + + +.byte 0x48, 0x0f, 0xc7, 0xf1 + + adcq %rax,%rax + movq %rcx,0(%rdi) + .byte 0xf3,0xc3 + + + + + +.globl CRYPTO_rdrand_multiple8_buf +.hidden CRYPTO_rdrand_multiple8_buf +.type CRYPTO_rdrand_multiple8_buf,@function +.align 16 +CRYPTO_rdrand_multiple8_buf: + testq %rsi,%rsi + jz .Lout + movq $8,%rdx +.Lloop: + + +.byte 0x48, 0x0f, 0xc7, 0xf1 + jnc .Lerr + movq %rcx,0(%rdi) + addq %rdx,%rdi + subq %rdx,%rsi + jnz .Lloop +.Lout: + movq $1,%rax + .byte 0xf3,0xc3 +.Lerr: + xorq %rax,%rax .byte 0xf3,0xc3 #endif |