Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | /*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------=== |
2 | * |
||
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 |
||
6 | * |
||
7 | *===-----------------------------------------------------------------------=== |
||
8 | */ |
||
9 | |||
10 | #ifndef __X86INTRIN_H |
||
11 | #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead." |
||
12 | #endif |
||
13 | |||
14 | #ifndef __MWAITXINTRIN_H |
||
15 | #define __MWAITXINTRIN_H |
||
16 | |||
17 | /* Define the default attributes for the functions in this file. */ |
||
18 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx"))) |
||
19 | static __inline__ void __DEFAULT_FN_ATTRS |
||
20 | _mm_monitorx(void * __p, unsigned __extensions, unsigned __hints) |
||
21 | { |
||
22 | __builtin_ia32_monitorx(__p, __extensions, __hints); |
||
23 | } |
||
24 | |||
25 | static __inline__ void __DEFAULT_FN_ATTRS |
||
26 | _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock) |
||
27 | { |
||
28 | __builtin_ia32_mwaitx(__extensions, __hints, __clock); |
||
29 | } |
||
30 | |||
31 | #undef __DEFAULT_FN_ATTRS |
||
32 | |||
33 | #endif /* __MWAITXINTRIN_H */ |