Skip to content

Instantly share code, notes, and snippets.

@enh
Created November 2, 2019 05:02
Show Gist options
  • Save enh/4142e30bf8f464810848c7b7743ba16b to your computer and use it in GitHub Desktop.
Save enh/4142e30bf8f464810848c7b7743ba16b to your computer and use it in GitHub Desktop.
Show RDRAND results.
// cc -mrdrnd rdrand.c -o rdrand && ./rdrand | head
#include <stdio.h>
void main() {
while (1) {
unsigned long long v;
int i = __builtin_ia32_rdrand64_step(&v);
printf("%d %#8llx\n", i, v);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment