clang 23.0.0git
arm64intr.h
Go to the documentation of this file.
1/*===---- arm64intr.h - ARM64 Windows 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/* Only include this if we're compiling for the windows platform. */
11#ifndef _MSC_VER
12#include_next <arm64intr.h>
13#else
14
15#ifndef __ARM64INTR_H
16#define __ARM64INTR_H
17
18/* Encode an AArch64 system register for use with
19 _ReadStatusReg/_WriteStatusReg. op0 must be 2 or 3; only the low bit is
20 stored. */
21#define ARM64_SYSREG(op0, op1, CRn, CRm, op2) \
22 ((((op0) & 0x1) << 14) | (((op1) & 0x7) << 11) | (((CRn) & 0xF) << 7) | \
23 (((CRm) & 0xF) << 3) | ((op2) & 0x7))
24
25#define ARM64_FPCR ARM64_SYSREG(3, 3, 4, 4, 0)
26#define ARM64_FPSR ARM64_SYSREG(3, 3, 4, 4, 1)
27
28typedef enum
29{
30 _ARM64_BARRIER_SY = 0xF,
31 _ARM64_BARRIER_ST = 0xE,
32 _ARM64_BARRIER_LD = 0xD,
33 _ARM64_BARRIER_ISH = 0xB,
34 _ARM64_BARRIER_ISHST = 0xA,
35 _ARM64_BARRIER_ISHLD = 0x9,
36 _ARM64_BARRIER_NSH = 0x7,
37 _ARM64_BARRIER_NSHST = 0x6,
38 _ARM64_BARRIER_NSHLD = 0x5,
39 _ARM64_BARRIER_OSH = 0x3,
40 _ARM64_BARRIER_OSHST = 0x2,
41 _ARM64_BARRIER_OSHLD = 0x1
42} _ARM64INTR_BARRIER_TYPE;
43
44#endif /* __ARM64INTR_H */
45#endif /* _MSC_VER */