1 /*===---- rdseedintrin.h - RDSEED intrinsics -------------------------------===
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===-----------------------------------------------------------------------===
10 #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11 #error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
14 #ifndef __RDSEEDINTRIN_H
15 #define __RDSEEDINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rdseed")))
20 static __inline__
int __DEFAULT_FN_ATTRS
21 _rdseed16_step(unsigned short *__p
)
23 return (int) __builtin_ia32_rdseed16_step(__p
);
26 static __inline__
int __DEFAULT_FN_ATTRS
27 _rdseed32_step(unsigned int *__p
)
29 return (int) __builtin_ia32_rdseed32_step(__p
);
33 static __inline__
int __DEFAULT_FN_ATTRS
34 _rdseed64_step(unsigned long long *__p
)
36 return (int) __builtin_ia32_rdseed64_step(__p
);
40 #undef __DEFAULT_FN_ATTRS
42 #endif /* __RDSEEDINTRIN_H */