logoalt Hacker News

peri-cltoday at 11:48 AM0 repliesview on HN

Zen 4 reporting in. I'm unable to reproduce it (7840U).

   $ ./a.out | rg '\b\-?\d\b' | sort -n | uniq -c
   15281 -2
   15192 -1
   15273 0
   15243 1
   15269 2
I used the GCC intrinsic ( _rdrand16_step ),

    #include <immintrin.h>
    
    short rdrand16() {     // gcc -mrdrnd
        short ret;
        while (1 != _rdrand16_step(&ret)) { }    
        return ret;
    }