Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | /*===---- xsavesintrin.h - XSAVES intrinsic --------------------------------=== |
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 __IMMINTRIN_H |
||
11 | #error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead." |
||
12 | #endif |
||
13 | |||
14 | #ifndef __XSAVESINTRIN_H |
||
15 | #define __XSAVESINTRIN_H |
||
16 | |||
17 | /* Define the default attributes for the functions in this file. */ |
||
18 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaves"))) |
||
19 | |||
20 | static __inline__ void __DEFAULT_FN_ATTRS |
||
21 | _xsaves(void *__p, unsigned long long __m) { |
||
22 | __builtin_ia32_xsaves(__p, __m); |
||
23 | } |
||
24 | |||
25 | static __inline__ void __DEFAULT_FN_ATTRS |
||
26 | _xrstors(void *__p, unsigned long long __m) { |
||
27 | __builtin_ia32_xrstors(__p, __m); |
||
28 | } |
||
29 | |||
30 | #ifdef __x86_64__ |
||
31 | static __inline__ void __DEFAULT_FN_ATTRS |
||
32 | _xrstors64(void *__p, unsigned long long __m) { |
||
33 | __builtin_ia32_xrstors64(__p, __m); |
||
34 | } |
||
35 | |||
36 | static __inline__ void __DEFAULT_FN_ATTRS |
||
37 | _xsaves64(void *__p, unsigned long long __m) { |
||
38 | __builtin_ia32_xsaves64(__p, __m); |
||
39 | } |
||
40 | #endif |
||
41 | |||
42 | #undef __DEFAULT_FN_ATTRS |
||
43 | |||
44 | #endif |