2023-04-27 02:56:41 -07:00
|
|
|
#if !defined _IMMINTRIN_H_INCLUDED
|
|
|
|
#error "Never use <rdseedintrin.h> directly; include <immintrin.h> instead."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _RDSEEDINTRIN_H_INCLUDED
|
|
|
|
#define _RDSEEDINTRIN_H_INCLUDED
|
|
|
|
|
|
|
|
#ifndef __RDSEED__
|
|
|
|
#pragma GCC push_options
|
|
|
|
#pragma GCC target("rdseed")
|
|
|
|
#define __DISABLE_RDSEED__
|
|
|
|
#endif /* __RDSEED__ */
|
|
|
|
|
2023-05-15 23:11:47 -07:00
|
|
|
__funline int _rdseed16_step(unsigned short *__p) {
|
2023-04-27 02:56:41 -07:00
|
|
|
return __builtin_ia32_rdseed_hi_step(__p);
|
|
|
|
}
|
|
|
|
|
2023-05-15 23:11:47 -07:00
|
|
|
__funline int _rdseed32_step(unsigned int *__p) {
|
2023-04-27 02:56:41 -07:00
|
|
|
return __builtin_ia32_rdseed_si_step(__p);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __x86_64__
|
2023-05-15 23:11:47 -07:00
|
|
|
__funline int _rdseed64_step(unsigned long long *__p) {
|
2023-04-27 02:56:41 -07:00
|
|
|
return __builtin_ia32_rdseed_di_step(__p);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __DISABLE_RDSEED__
|
|
|
|
#undef __DISABLE_RDSEED__
|
|
|
|
#pragma GCC pop_options
|
|
|
|
#endif /* __DISABLE_RDSEED__ */
|
|
|
|
|
|
|
|
#endif /* _RDSEEDINTRIN_H_INCLUDED */
|