rdrand-x86_64.S 919 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // This file is generated from a similarly-named Perl script in the BoringSSL
  2. // source tree. Do not edit by hand.
  3. #if defined(__has_feature)
  4. #if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM)
  5. #define OPENSSL_NO_ASM
  6. #endif
  7. #endif
  8. #if defined(__x86_64__) && !defined(OPENSSL_NO_ASM)
  9. #if defined(BORINGSSL_PREFIX)
  10. #include <boringssl_prefix_symbols_asm.h>
  11. #endif
  12. .text
  13. .globl _CRYPTO_rdrand
  14. .private_extern _CRYPTO_rdrand
  15. .p2align 4
  16. _CRYPTO_rdrand:
  17. xorq %rax,%rax
  18. .byte 72,15,199,242
  19. adcq %rax,%rax
  20. movq %rdx,0(%rdi)
  21. .byte 0xf3,0xc3
  22. .globl _CRYPTO_rdrand_multiple8_buf
  23. .private_extern _CRYPTO_rdrand_multiple8_buf
  24. .p2align 4
  25. _CRYPTO_rdrand_multiple8_buf:
  26. testq %rsi,%rsi
  27. jz L$out
  28. movq $8,%rdx
  29. L$loop:
  30. .byte 72,15,199,241
  31. jnc L$err
  32. movq %rcx,0(%rdi)
  33. addq %rdx,%rdi
  34. subq %rdx,%rsi
  35. jnz L$loop
  36. L$out:
  37. movq $1,%rax
  38. .byte 0xf3,0xc3
  39. L$err:
  40. xorq %rax,%rax
  41. .byte 0xf3,0xc3
  42. #endif