xref: /openbsd-src/gnu/llvm/clang/lib/Headers/mwaitxintrin.h (revision e5dd70708596ae51455a0ffa086a00c5b29f8583)
1*e5dd7070Spatrick /*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------===
2*e5dd7070Spatrick  *
3*e5dd7070Spatrick  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*e5dd7070Spatrick  * See https://llvm.org/LICENSE.txt for license information.
5*e5dd7070Spatrick  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*e5dd7070Spatrick  *
7*e5dd7070Spatrick  *===-----------------------------------------------------------------------===
8*e5dd7070Spatrick  */
9*e5dd7070Spatrick 
10*e5dd7070Spatrick #ifndef __X86INTRIN_H
11*e5dd7070Spatrick #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
12*e5dd7070Spatrick #endif
13*e5dd7070Spatrick 
14*e5dd7070Spatrick #ifndef __MWAITXINTRIN_H
15*e5dd7070Spatrick #define __MWAITXINTRIN_H
16*e5dd7070Spatrick 
17*e5dd7070Spatrick /* Define the default attributes for the functions in this file. */
18*e5dd7070Spatrick #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("mwaitx")))
19*e5dd7070Spatrick static __inline__ void __DEFAULT_FN_ATTRS
_mm_monitorx(void * __p,unsigned __extensions,unsigned __hints)20*e5dd7070Spatrick _mm_monitorx(void * __p, unsigned __extensions, unsigned __hints)
21*e5dd7070Spatrick {
22*e5dd7070Spatrick   __builtin_ia32_monitorx(__p, __extensions, __hints);
23*e5dd7070Spatrick }
24*e5dd7070Spatrick 
25*e5dd7070Spatrick static __inline__ void __DEFAULT_FN_ATTRS
_mm_mwaitx(unsigned __extensions,unsigned __hints,unsigned __clock)26*e5dd7070Spatrick _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
27*e5dd7070Spatrick {
28*e5dd7070Spatrick   __builtin_ia32_mwaitx(__extensions, __hints, __clock);
29*e5dd7070Spatrick }
30*e5dd7070Spatrick 
31*e5dd7070Spatrick #undef __DEFAULT_FN_ATTRS
32*e5dd7070Spatrick 
33*e5dd7070Spatrick #endif /* __MWAITXINTRIN_H */
34