clang 20.0.0git
Macros | Functions
rdseedintrin.h File Reference

Go to the source code of this file.

Macros

#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__, __target__("rdseed")))
 

Functions

static __inline__ int __DEFAULT_FN_ATTRS _rdseed16_step (unsigned short *__p)
 Stores a hardware-generated 16-bit random value in the memory at __p.
 
static __inline__ int __DEFAULT_FN_ATTRS _rdseed32_step (unsigned int *__p)
 Stores a hardware-generated 32-bit random value in the memory at __p.
 

Macro Definition Documentation

◆ __DEFAULT_FN_ATTRS

#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__, __target__("rdseed")))

Definition at line 18 of file rdseedintrin.h.

Function Documentation

◆ _rdseed16_step()

static __inline__ int __DEFAULT_FN_ATTRS _rdseed16_step ( unsigned short *  __p)
static

Stores a hardware-generated 16-bit random value in the memory at __p.

The random number generator complies with NIST SP800-90B and SP800-90C.

IF HW_NRND_GEN.ready == 1
Store16(__p, HW_NRND_GEN.data)
result := 1
ELSE
Store16(__p, 0)
result := 0
END

This intrinsic corresponds to the RDSEED instruction.

Parameters
__pPointer to memory for storing the 16-bit random number.
Returns
1 if a random number was generated, 0 if not.

Definition at line 42 of file rdseedintrin.h.

References __p.

◆ _rdseed32_step()

static __inline__ int __DEFAULT_FN_ATTRS _rdseed32_step ( unsigned int __p)
static

Stores a hardware-generated 32-bit random value in the memory at __p.

The random number generator complies with NIST SP800-90B and SP800-90C.

IF HW_NRND_GEN.ready == 1
Store32(__p, HW_NRND_GEN.data)
result := 1
ELSE
Store32(__p, 0)
result := 0
END

This intrinsic corresponds to the RDSEED instruction.

Parameters
__pPointer to memory for storing the 32-bit random number.
Returns
1 if a random number was generated, 0 if not.

Definition at line 69 of file rdseedintrin.h.

References __p.