1 /*===---- fxsrintrin.h - FXSR intrinsic ------------------------------------===
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 *===-----------------------------------------------------------------------===
25 #error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
28 #ifndef __FXSRINTRIN_H
29 #define __FXSRINTRIN_H
31 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fxsr")))
33 /// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
34 /// memory region pointed to by the input parameter \a __p.
36 /// \headerfile <x86intrin.h>
38 /// This intrinsic corresponds to the <c> FXSAVE </c> instruction.
41 /// A pointer to a 512-byte memory region. The beginning of this memory
42 /// region should be aligned on a 16-byte boundary.
43 static __inline__ void __DEFAULT_FN_ATTRS
46 __builtin_ia32_fxsave(__p);
49 /// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
50 /// memory region pointed to by the input parameter \a __p. The contents of
51 /// this memory region should have been written to by a previous \c _fxsave
52 /// or \c _fxsave64 intrinsic.
54 /// \headerfile <x86intrin.h>
56 /// This intrinsic corresponds to the <c> FXRSTOR </c> instruction.
59 /// A pointer to a 512-byte memory region. The beginning of this memory
60 /// region should be aligned on a 16-byte boundary.
61 static __inline__ void __DEFAULT_FN_ATTRS
64 __builtin_ia32_fxrstor(__p);
68 /// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
69 /// memory region pointed to by the input parameter \a __p.
71 /// \headerfile <x86intrin.h>
73 /// This intrinsic corresponds to the <c> FXSAVE64 </c> instruction.
76 /// A pointer to a 512-byte memory region. The beginning of this memory
77 /// region should be aligned on a 16-byte boundary.
78 static __inline__ void __DEFAULT_FN_ATTRS
81 __builtin_ia32_fxsave64(__p);
84 /// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
85 /// memory region pointed to by the input parameter \a __p. The contents of
86 /// this memory region should have been written to by a previous \c _fxsave
87 /// or \c _fxsave64 intrinsic.
89 /// \headerfile <x86intrin.h>
91 /// This intrinsic corresponds to the <c> FXRSTOR64 </c> instruction.
94 /// A pointer to a 512-byte memory region. The beginning of this memory
95 /// region should be aligned on a 16-byte boundary.
96 static __inline__ void __DEFAULT_FN_ATTRS
99 __builtin_ia32_fxrstor64(__p);
103 #undef __DEFAULT_FN_ATTRS