1 | //===---- CSKYAttributes.h - CSKY Attributes --------------------*- C++ -*-===// |
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 | // This file contains enumerations for CSKY attributes. |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | #ifndef LLVM_SUPPORT_CSKYATTRIBUTES_H |
13 | #define LLVM_SUPPORT_CSKYATTRIBUTES_H |
14 | |
15 | #include "llvm/Support/ELFAttributes.h" |
16 | |
17 | namespace llvm { |
18 | namespace CSKYAttrs { |
19 | |
20 | const TagNameMap &getCSKYAttributeTags(); |
21 | |
22 | enum AttrType { |
23 | CSKY_ARCH_NAME = 4, |
24 | CSKY_CPU_NAME = 5, |
25 | CSKY_ISA_FLAGS = 6, |
26 | CSKY_ISA_EXT_FLAGS = 7, |
27 | CSKY_DSP_VERSION = 8, |
28 | CSKY_VDSP_VERSION = 9, |
29 | CSKY_FPU_VERSION = 16, |
30 | CSKY_FPU_ABI = 17, |
31 | CSKY_FPU_ROUNDING = 18, |
32 | CSKY_FPU_DENORMAL = 19, |
33 | CSKY_FPU_EXCEPTION = 20, |
34 | CSKY_FPU_NUMBER_MODULE = 21, |
35 | CSKY_FPU_HARDFP = 22 |
36 | }; |
37 | |
38 | enum ISA_FLAGS { |
39 | V2_ISA_E1 = 1 << 1, |
40 | V2_ISA_1E2 = 1 << 2, |
41 | V2_ISA_2E3 = 1 << 3, |
42 | V2_ISA_3E7 = 1 << 4, |
43 | V2_ISA_7E10 = 1 << 5, |
44 | V2_ISA_3E3R1 = 1 << 6, |
45 | V2_ISA_3E3R2 = 1 << 7, |
46 | V2_ISA_10E60 = 1 << 8, |
47 | V2_ISA_3E3R3 = 1 << 9, |
48 | ISA_TRUST = 1 << 11, |
49 | ISA_CACHE = 1 << 12, |
50 | ISA_NVIC = 1 << 13, |
51 | ISA_CP = 1 << 14, |
52 | ISA_MP = 1 << 15, |
53 | ISA_MP_1E2 = 1 << 16, |
54 | ISA_JAVA = 1 << 17, |
55 | ISA_MAC = 1 << 18, |
56 | ISA_MAC_DSP = 1 << 19, |
57 | ISA_DSP = 1 << 20, |
58 | ISA_DSP_1E2 = 1 << 21, |
59 | ISA_DSP_ENHANCE = 1 << 22, |
60 | ISA_DSP_SILAN = 1 << 23, |
61 | ISA_VDSP = 1 << 24, |
62 | ISA_VDSP_2 = 1 << 25, |
63 | ISA_VDSP_2E3 = 1 << 26, |
64 | V2_ISA_DSPE60 = 1 << 27, |
65 | ISA_VDSP_2E60F = 1 << 28 |
66 | }; |
67 | |
68 | enum ISA_EXT_FLAGS { |
69 | ISA_FLOAT_E1 = 1 << 0, |
70 | ISA_FLOAT_1E2 = 1 << 1, |
71 | ISA_FLOAT_1E3 = 1 << 2, |
72 | ISA_FLOAT_3E4 = 1 << 3, |
73 | ISA_FLOAT_7E60 = 1 << 4 |
74 | }; |
75 | |
76 | enum { NONE = 0, NEEDED = 1 }; |
77 | |
78 | enum DSP_VERSION { DSP_VERSION_EXTENSION = 1, DSP_VERSION_2 = 2 }; |
79 | |
80 | enum VDSP_VERSION { VDSP_VERSION_1 = 1, VDSP_VERSION_2 = 2 }; |
81 | |
82 | enum FPU_VERSION { FPU_VERSION_1 = 1, FPU_VERSION_2 = 2, FPU_VERSION_3 = 3 }; |
83 | |
84 | enum FPU_ABI { FPU_ABI_SOFT = 1, FPU_ABI_SOFTFP = 2, FPU_ABI_HARD = 3 }; |
85 | |
86 | enum FPU_HARDFP { |
87 | FPU_HARDFP_HALF = 1, |
88 | FPU_HARDFP_SINGLE = 2, |
89 | FPU_HARDFP_DOUBLE = 4 |
90 | }; |
91 | |
92 | } // namespace CSKYAttrs |
93 | } // namespace llvm |
94 | |
95 | #endif |
96 | |