1341825Sdim/*===---- xsavesintrin.h - XSAVES intrinsic --------------------------------=== 2292920Sdim * 3353358Sdim * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim * See https://llvm.org/LICENSE.txt for license information. 5353358Sdim * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6292920Sdim * 7292920Sdim *===-----------------------------------------------------------------------=== 8292920Sdim */ 9292920Sdim 10292920Sdim#ifndef __IMMINTRIN_H 11292920Sdim#error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead." 12292920Sdim#endif 13292920Sdim 14292920Sdim#ifndef __XSAVESINTRIN_H 15292920Sdim#define __XSAVESINTRIN_H 16292920Sdim 17292920Sdim/* Define the default attributes for the functions in this file. */ 18292920Sdim#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaves"))) 19292920Sdim 20292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 21292920Sdim_xsaves(void *__p, unsigned long long __m) { 22292920Sdim __builtin_ia32_xsaves(__p, __m); 23292920Sdim} 24292920Sdim 25292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 26292920Sdim_xrstors(void *__p, unsigned long long __m) { 27292920Sdim __builtin_ia32_xrstors(__p, __m); 28292920Sdim} 29292920Sdim 30292920Sdim#ifdef __x86_64__ 31292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 32292920Sdim_xrstors64(void *__p, unsigned long long __m) { 33292920Sdim __builtin_ia32_xrstors64(__p, __m); 34292920Sdim} 35292920Sdim 36292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 37292920Sdim_xsaves64(void *__p, unsigned long long __m) { 38292920Sdim __builtin_ia32_xsaves64(__p, __m); 39292920Sdim} 40292920Sdim#endif 41292920Sdim 42292920Sdim#undef __DEFAULT_FN_ATTRS 43292920Sdim 44292920Sdim#endif 45