1 /*===---- xsavecintrin.h - XSAVEC intrinsic --------------------------------===
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
7 *===-----------------------------------------------------------------------===
11 #error "Never use <xsavecintrin.h> directly; include <immintrin.h> instead."
14 #ifndef __XSAVECINTRIN_H
15 #define __XSAVECINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsavec")))
20 /// Performs a full or partial save of processor state to the memory at
21 /// \a __p. The exact state saved depends on the 64-bit mask \a __m and
22 /// processor control register \c XCR0.
25 /// mask[62:0] := __m[62:0] AND XCR0[62:0]
29 /// 0: save X87 FPU state
31 /// DEFAULT: __p.Ext_Save_Area[i] := ProcessorState[i]
34 /// __p.Header.XSTATE_BV[62:0] := INIT_FUNCTION(mask[62:0])
37 /// \headerfile <immintrin.h>
39 /// This intrinsic corresponds to the \c XSAVEC instruction.
42 /// Pointer to the save area; must be 64-byte aligned.
44 /// A 64-bit mask indicating what state should be saved.
45 static __inline__
void __DEFAULT_FN_ATTRS
46 _xsavec(void *__p
, unsigned long long __m
) {
47 __builtin_ia32_xsavec(__p
, __m
);
51 /// Performs a full or partial save of processor state to the memory at
52 /// \a __p. The exact state saved depends on the 64-bit mask \a __m and
53 /// processor control register \c XCR0.
56 /// mask[62:0] := __m[62:0] AND XCR0[62:0]
60 /// 0: save X87 FPU state
62 /// DEFAULT: __p.Ext_Save_Area[i] := ProcessorState[i]
65 /// __p.Header.XSTATE_BV[62:0] := INIT_FUNCTION(mask[62:0])
68 /// \headerfile <immintrin.h>
70 /// This intrinsic corresponds to the \c XSAVEC64 instruction.
73 /// Pointer to the save area; must be 64-byte aligned.
75 /// A 64-bit mask indicating what state should be saved.
76 static __inline__
void __DEFAULT_FN_ATTRS
77 _xsavec64(void *__p
, unsigned long long __m
) {
78 __builtin_ia32_xsavec64(__p
, __m
);
82 #undef __DEFAULT_FN_ATTRS