[LLVMdev] Hardware Random Numbers

Benjamin Kramer benny.kra at gmail.com
Tue Jul 1 00:51:35 PDT 2014


On Tue, Jul 1, 2014 at 6:01 AM, William Moses
<moses.williamsteven at gmail.com> wrote:
> Hello,
>
> Does LLVM support an intrinsic for hardware-based random number generators
> such as the one found in
> (https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide)?

I'm not aware of a generic instrinsic, but you can use the intel
specific ones. e.g. @llvm.x86.rdrand will give you a rdrand
instruction.

You can look at the IR emitted by Clang when using Intel's
_rdrand32_step intrinsics for example code.

- Ben
>
> Thanks,
> Billy Moses
> MIT '18
> TJHSST '14
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list