xref: /freebsd/contrib/llvm-project/clang/lib/Headers/riscv_ntlh.h (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1 /*===---- riscv_ntlh.h - RISC-V NTLH intrinsics ----------------------------===
2  *
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
6  *
7  *===-----------------------------------------------------------------------===
8  */
9 
10 #ifndef __RISCV_NTLH_H
11 #define __RISCV_NTLH_H
12 
13 #ifndef __riscv_zihintntl
14 #error "NTLH intrinsics require the NTLH extension."
15 #endif
16 
17 enum {
18   __RISCV_NTLH_INNERMOST_PRIVATE = 2,
19   __RISCV_NTLH_ALL_PRIVATE,
20   __RISCV_NTLH_INNERMOST_SHARED,
21   __RISCV_NTLH_ALL
22 };
23 
24 #define __riscv_ntl_load(PTR, DOMAIN) __builtin_riscv_ntl_load((PTR), (DOMAIN))
25 #define __riscv_ntl_store(PTR, VAL, DOMAIN)                                    \
26   __builtin_riscv_ntl_store((PTR), (VAL), (DOMAIN))
27 
28 #endif