rdrand-x86_64.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. .hidden CRYPTO_rdrand
  15. .type CRYPTO_rdrand,@function
  16. .align 16
  17. CRYPTO_rdrand:
  18. .cfi_startproc
  19. xorq %rax,%rax
  20. .byte 72,15,199,242
  21. adcq %rax,%rax
  22. movq %rdx,0(%rdi)
  23. .byte 0xf3,0xc3
  24. .cfi_endproc
  25. .size CRYPTO_rdrand,.-CRYPTO_rdrand
  26. .globl CRYPTO_rdrand_multiple8_buf
  27. .hidden CRYPTO_rdrand_multiple8_buf
  28. .type CRYPTO_rdrand_multiple8_buf,@function
  29. .align 16
  30. CRYPTO_rdrand_multiple8_buf:
  31. .cfi_startproc
  32. testq %rsi,%rsi
  33. jz .Lout
  34. movq $8,%rdx
  35. .Lloop:
  36. .byte 72,15,199,241
  37. jnc .Lerr
  38. movq %rcx,0(%rdi)
  39. addq %rdx,%rdi
  40. subq %rdx,%rsi
  41. jnz .Lloop
  42. .Lout:
  43. movq $1,%rax
  44. .byte 0xf3,0xc3
  45. .Lerr:
  46. xorq %rax,%rax
  47. .byte 0xf3,0xc3
  48. .cfi_endproc
  49. .size CRYPTO_rdrand_multiple8_buf,.-CRYPTO_rdrand_multiple8_buf
  50. #endif
  51. .section .note.GNU-stack,"",@progbits