Created
January 17, 2017 21:17
-
-
Save aburan28/c05622ff502b1db276791043d3a60cb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int rdseed16_step (uint16_t *seed) | |
{ | |
unsigned char ok; | |
asm volatile ("rdseed %0; setc %1" | |
: "=r" (*seed), "=qm" (ok)); | |
return (int) ok; | |
} | |
int rdseed32_step (uint32_t *seed) | |
{ | |
unsigned char ok; | |
asm volatile ("rdseed %0; setc %1" | |
: "=r" (*seed), "=qm" (ok)); | |
return (int) ok; | |
} | |
int rdseed64_step (uint64_t *seed) | |
{ | |
unsigned char ok; | |
asm volatile ("rdseed %0; setc %1" | |
: "=r" (*seed), "=qm" (ok)); | |
return (int) ok; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment