xsaveoptintrin.h revision 292920
1292920Sdim/*===---- xsaveoptintrin.h - XSAVEOPT intrinsic ------------------------------------===
2292920Sdim *
3292920Sdim * Permission is hereby granted, free of charge, to any person obtaining a copy
4292920Sdim * of this software and associated documentation files (the "Software"), to deal
5292920Sdim * in the Software without restriction, including without limitation the rights
6292920Sdim * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7292920Sdim * copies of the Software, and to permit persons to whom the Software is
8292920Sdim * furnished to do so, subject to the following conditions:
9292920Sdim *
10292920Sdim * The above copyright notice and this permission notice shall be included in
11292920Sdim * all copies or substantial portions of the Software.
12292920Sdim *
13292920Sdim * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14292920Sdim * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15292920Sdim * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16292920Sdim * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17292920Sdim * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18292920Sdim * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19292920Sdim * THE SOFTWARE.
20292920Sdim *
21292920Sdim *===-----------------------------------------------------------------------===
22292920Sdim */
23292920Sdim
24292920Sdim#ifndef __IMMINTRIN_H
25292920Sdim#error "Never use <xsaveoptintrin.h> directly; include <immintrin.h> instead."
26292920Sdim#endif
27292920Sdim
28292920Sdim#ifndef __XSAVEOPTINTRIN_H
29292920Sdim#define __XSAVEOPTINTRIN_H
30292920Sdim
31292920Sdim/* Define the default attributes for the functions in this file. */
32292920Sdim#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("xsaveopt")))
33292920Sdim
34292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS
35292920Sdim_xsaveopt(void *__p, unsigned long long __m) {
36292920Sdim  return __builtin_ia32_xsaveopt(__p, __m);
37292920Sdim}
38292920Sdim
39292920Sdim#ifdef __x86_64__
40292920Sdimstatic __inline__ void __DEFAULT_FN_ATTRS
41292920Sdim_xsaveopt64(void *__p, unsigned long long __m) {
42292920Sdim  return __builtin_ia32_xsaveopt64(__p, __m);
43292920Sdim}
44292920Sdim#endif
45292920Sdim
46292920Sdim#undef __DEFAULT_FN_ATTRS
47292920Sdim
48292920Sdim#endif
49