Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1435)

Unified Diff: third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm

Issue 1319703002: Breaking Change: merge BoringSSL branch into master (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm
diff --git a/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm
new file mode 100644
index 0000000000000000000000000000000000000000..4c03791b48efed0eda7140d590c3da8faeeb9ec9
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm
@@ -0,0 +1,70 @@
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+
+
+
+global CRYPTO_rdrand
+
+ALIGN 16
+CRYPTO_rdrand:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_CRYPTO_rdrand:
+ mov rdi,rcx
+
+
+ xor rax,rax
+
+
+DB 0x48,0x0f,0xc7,0xf1
+
+ adc rax,rax
+ mov QWORD[rdi],rcx
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+global CRYPTO_rdrand_multiple8_buf
+
+ALIGN 16
+CRYPTO_rdrand_multiple8_buf:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_CRYPTO_rdrand_multiple8_buf:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ test rsi,rsi
+ jz NEAR $L$out
+ mov rdx,8
+$L$loop:
+
+
+DB 0x48,0x0f,0xc7,0xf1
+ jnc NEAR $L$err
+ mov QWORD[rdi],rcx
+ add rdi,rdx
+ sub rsi,rdx
+ jnz NEAR $L$loop
+$L$out:
+ mov rax,1
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$err:
+ xor rax,rax
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret

Powered by Google App Engine
This is Rietveld 408576698