1 /*===---- pkuintrin.h - PKU intrinsics -------------------------------------===
4 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 * See https://llvm.org/LICENSE.txt for license information.
6 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 *===-----------------------------------------------------------------------===
11 #error "Never use <pkuintrin.h> directly; include <immintrin.h> instead."
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("pku")))
20 static __inline__
unsigned int __DEFAULT_FN_ATTRS
23 return __builtin_ia32_rdpkru();
26 static __inline__
void __DEFAULT_FN_ATTRS
27 _wrpkru(unsigned int __val
)
29 __builtin_ia32_wrpkru(__val
);
32 #undef __DEFAULT_FN_ATTRS