OLD | NEW |
| (Empty) |
1 default rel | |
2 %define XMMWORD | |
3 %define YMMWORD | |
4 %define ZMMWORD | |
5 section .text code align=64 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 global CRYPTO_rdrand | |
12 | |
13 ALIGN 16 | |
14 CRYPTO_rdrand: | |
15 mov QWORD[8+rsp],rdi ;WIN64 prologue | |
16 mov QWORD[16+rsp],rsi | |
17 mov rax,rsp | |
18 $L$SEH_begin_CRYPTO_rdrand: | |
19 mov rdi,rcx | |
20 | |
21 | |
22 xor rax,rax | |
23 | |
24 | |
25 DB 0x48,0x0f,0xc7,0xf1 | |
26 | |
27 adc rax,rax | |
28 mov QWORD[rdi],rcx | |
29 mov rdi,QWORD[8+rsp] ;WIN64 epilogue | |
30 mov rsi,QWORD[16+rsp] | |
31 DB 0F3h,0C3h ;repret | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 global CRYPTO_rdrand_multiple8_buf | |
38 | |
39 ALIGN 16 | |
40 CRYPTO_rdrand_multiple8_buf: | |
41 mov QWORD[8+rsp],rdi ;WIN64 prologue | |
42 mov QWORD[16+rsp],rsi | |
43 mov rax,rsp | |
44 $L$SEH_begin_CRYPTO_rdrand_multiple8_buf: | |
45 mov rdi,rcx | |
46 mov rsi,rdx | |
47 | |
48 | |
49 test rsi,rsi | |
50 jz NEAR $L$out | |
51 mov rdx,8 | |
52 $L$loop: | |
53 | |
54 | |
55 DB 0x48,0x0f,0xc7,0xf1 | |
56 jnc NEAR $L$err | |
57 mov QWORD[rdi],rcx | |
58 add rdi,rdx | |
59 sub rsi,rdx | |
60 jnz NEAR $L$loop | |
61 $L$out: | |
62 mov rax,1 | |
63 mov rdi,QWORD[8+rsp] ;WIN64 epilogue | |
64 mov rsi,QWORD[16+rsp] | |
65 DB 0F3h,0C3h ;repret | |
66 $L$err: | |
67 xor rax,rax | |
68 mov rdi,QWORD[8+rsp] ;WIN64 epilogue | |
69 mov rsi,QWORD[16+rsp] | |
70 DB 0F3h,0C3h ;repret | |
OLD | NEW |