~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/dispatch.c, rand/rand.c, and asm: Support `rdseed' for quick noise.
[catacomb]
/
rand
/
rand.c
diff --git
a/rand/rand.c
b/rand/rand.c
index
304c68d
..
3b05633
100644
(file)
--- a/
rand/rand.c
+++ b/
rand/rand.c
@@
-163,11
+163,14
@@
static int trivial_quick(rand_pool *r) { return (-1); }
#if CPUFAM_X86 || CPUFAM_AMD64
extern int rand_quick_x86ish_rdrand(rand_pool */*r*/);
#if CPUFAM_X86 || CPUFAM_AMD64
extern int rand_quick_x86ish_rdrand(rand_pool */*r*/);
+extern int rand_quick_x86ish_rdseed(rand_pool */*r*/);
#endif
static quick__functype *pick_quick(void)
{
#if CPUFAM_X86 || CPUFAM_AMD64
#endif
static quick__functype *pick_quick(void)
{
#if CPUFAM_X86 || CPUFAM_AMD64
+ DISPATCH_PICK_COND(rand_quick, rand_quick_x86ish_rdseed,
+ cpu_feature_p(CPUFEAT_X86_RDSEED));
DISPATCH_PICK_COND(rand_quick, rand_quick_x86ish_rdrand,
cpu_feature_p(CPUFEAT_X86_RDRAND));
#endif
DISPATCH_PICK_COND(rand_quick, rand_quick_x86ish_rdrand,
cpu_feature_p(CPUFEAT_X86_RDRAND));
#endif