mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Add Intel intrinsics headers
This commit is contained in:
parent
369f9740de
commit
b7bf052a4b
121 changed files with 47114 additions and 849 deletions
39
third_party/intel/rdseedintrin.internal.h
vendored
Normal file
39
third_party/intel/rdseedintrin.internal.h
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
#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__ */
|
||||
|
||||
extern __inline int
|
||||
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_rdseed16_step(unsigned short *__p) {
|
||||
return __builtin_ia32_rdseed_hi_step(__p);
|
||||
}
|
||||
|
||||
extern __inline int
|
||||
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_rdseed32_step(unsigned int *__p) {
|
||||
return __builtin_ia32_rdseed_si_step(__p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
extern __inline int
|
||||
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_rdseed64_step(unsigned long long *__p) {
|
||||
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 */
|
Loading…
Add table
Add a link
Reference in a new issue