xref: /netbsd-src/external/apache2/llvm/dist/clang/lib/Headers/mwaitxintrin.h (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
17330f729Sjoerg /*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------===
27330f729Sjoerg  *
37330f729Sjoerg  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
47330f729Sjoerg  * See https://llvm.org/LICENSE.txt for license information.
57330f729Sjoerg  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
67330f729Sjoerg  *
77330f729Sjoerg  *===-----------------------------------------------------------------------===
87330f729Sjoerg  */
97330f729Sjoerg 
107330f729Sjoerg #ifndef __X86INTRIN_H
117330f729Sjoerg #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
127330f729Sjoerg #endif
137330f729Sjoerg 
147330f729Sjoerg #ifndef __MWAITXINTRIN_H
157330f729Sjoerg #define __MWAITXINTRIN_H
167330f729Sjoerg 
177330f729Sjoerg /* Define the default attributes for the functions in this file. */
187330f729Sjoerg #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("mwaitx")))
197330f729Sjoerg static __inline__ void __DEFAULT_FN_ATTRS
_mm_monitorx(void * __p,unsigned __extensions,unsigned __hints)20*e038c9c4Sjoerg _mm_monitorx(void * __p, unsigned __extensions, unsigned __hints)
217330f729Sjoerg {
22*e038c9c4Sjoerg   __builtin_ia32_monitorx(__p, __extensions, __hints);
237330f729Sjoerg }
247330f729Sjoerg 
257330f729Sjoerg static __inline__ void __DEFAULT_FN_ATTRS
_mm_mwaitx(unsigned __extensions,unsigned __hints,unsigned __clock)267330f729Sjoerg _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
277330f729Sjoerg {
287330f729Sjoerg   __builtin_ia32_mwaitx(__extensions, __hints, __clock);
297330f729Sjoerg }
307330f729Sjoerg 
317330f729Sjoerg #undef __DEFAULT_FN_ATTRS
327330f729Sjoerg 
337330f729Sjoerg #endif /* __MWAITXINTRIN_H */
34