Debian Codegraph @

arch/SystemZ/SystemZMCTargetDesc.c

raw symbols SCIP
1 //===-- SystemZMCTargetDesc.cpp - SystemZ target descriptions -------------===//cxx . . $ `<file>/arch/SystemZ/SystemZMCTargetDesc.c`/
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 /* Capstone Disassembly Engine */
11 /* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */
12
13 #ifdef CAPSTONE_HAS_SYSZcxx . . $ `<built-in>:419:9`!
14
15 #include <capstone/platform.h>cxx . . $ `<file>/include/capstone/platform.h`/
16 #include "SystemZMCTargetDesc.h"cxx . . $ `<file>/arch/SystemZ/SystemZMCTargetDesc.h`/
17
18 #define GET_REGINFO_ENUMcxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:18:9`!
19 #include "SystemZGenRegisterInfo.inc"cxx . . $ `<file>/arch/SystemZ/SystemZGenRegisterInfo.inc`/
20
21 const unsigned SystemZMC_GR32Regscxx . . $ SystemZMC_GR32Regs.[16] = {
22 SystemZ_R0Lcxx . . $ SystemZ_R0L., SystemZ_R1Lcxx . . $ SystemZ_R1L., SystemZ_R2Lcxx . . $ SystemZ_R2L., SystemZ_R3Lcxx . . $ SystemZ_R3L.,
23 SystemZ_R4Lcxx . . $ SystemZ_R4L., SystemZ_R5Lcxx . . $ SystemZ_R5L., SystemZ_R6Lcxx . . $ SystemZ_R6L., SystemZ_R7Lcxx . . $ SystemZ_R7L.,
24 SystemZ_R8Lcxx . . $ SystemZ_R8L., SystemZ_R9Lcxx . . $ SystemZ_R9L., SystemZ_R10Lcxx . . $ SystemZ_R10L., SystemZ_R11Lcxx . . $ SystemZ_R11L.,
25 SystemZ_R12Lcxx . . $ SystemZ_R12L., SystemZ_R13Lcxx . . $ SystemZ_R13L., SystemZ_R14Lcxx . . $ SystemZ_R14L., SystemZ_R15Lcxx . . $ SystemZ_R15L.
26 };
27
28 const unsigned SystemZMC_GRH32Regscxx . . $ SystemZMC_GRH32Regs.[16] = {
29 SystemZ_R0Hcxx . . $ SystemZ_R0H., SystemZ_R1Hcxx . . $ SystemZ_R1H., SystemZ_R2Hcxx . . $ SystemZ_R2H., SystemZ_R3Hcxx . . $ SystemZ_R3H.,
30 SystemZ_R4Hcxx . . $ SystemZ_R4H., SystemZ_R5Hcxx . . $ SystemZ_R5H., SystemZ_R6Hcxx . . $ SystemZ_R6H., SystemZ_R7Hcxx . . $ SystemZ_R7H.,
31 SystemZ_R8Hcxx . . $ SystemZ_R8H., SystemZ_R9Hcxx . . $ SystemZ_R9H., SystemZ_R10Hcxx . . $ SystemZ_R10H., SystemZ_R11Hcxx . . $ SystemZ_R11H.,
32 SystemZ_R12Hcxx . . $ SystemZ_R12H., SystemZ_R13Hcxx . . $ SystemZ_R13H., SystemZ_R14Hcxx . . $ SystemZ_R14H., SystemZ_R15Hcxx . . $ SystemZ_R15H.
33 };
34
35 const unsigned SystemZMC_GR64Regscxx . . $ SystemZMC_GR64Regs.[16] = {
36 SystemZ_R0Dcxx . . $ SystemZ_R0D., SystemZ_R1Dcxx . . $ SystemZ_R1D., SystemZ_R2Dcxx . . $ SystemZ_R2D., SystemZ_R3Dcxx . . $ SystemZ_R3D.,
37 SystemZ_R4Dcxx . . $ SystemZ_R4D., SystemZ_R5Dcxx . . $ SystemZ_R5D., SystemZ_R6Dcxx . . $ SystemZ_R6D., SystemZ_R7Dcxx . . $ SystemZ_R7D.,
38 SystemZ_R8Dcxx . . $ SystemZ_R8D., SystemZ_R9Dcxx . . $ SystemZ_R9D., SystemZ_R10Dcxx . . $ SystemZ_R10D., SystemZ_R11Dcxx . . $ SystemZ_R11D.,
39 SystemZ_R12Dcxx . . $ SystemZ_R12D., SystemZ_R13Dcxx . . $ SystemZ_R13D., SystemZ_R14Dcxx . . $ SystemZ_R14D., SystemZ_R15Dcxx . . $ SystemZ_R15D.
40 };
41
42 const unsigned SystemZMC_GR128Regscxx . . $ SystemZMC_GR128Regs.[16] = {
43 SystemZ_R0Qcxx . . $ SystemZ_R0Q., 0, SystemZ_R2Qcxx . . $ SystemZ_R2Q., 0,
44 SystemZ_R4Qcxx . . $ SystemZ_R4Q., 0, SystemZ_R6Qcxx . . $ SystemZ_R6Q., 0,
45 SystemZ_R8Qcxx . . $ SystemZ_R8Q., 0, SystemZ_R10Qcxx . . $ SystemZ_R10Q., 0,
46 SystemZ_R12Qcxx . . $ SystemZ_R12Q., 0, SystemZ_R14Qcxx . . $ SystemZ_R14Q., 0
47 };
48
49 const unsigned SystemZMC_FP32Regscxx . . $ SystemZMC_FP32Regs.[16] = {
50 SystemZ_F0Scxx . . $ SystemZ_F0S., SystemZ_F1Scxx . . $ SystemZ_F1S., SystemZ_F2Scxx . . $ SystemZ_F2S., SystemZ_F3Scxx . . $ SystemZ_F3S.,
51 SystemZ_F4Scxx . . $ SystemZ_F4S., SystemZ_F5Scxx . . $ SystemZ_F5S., SystemZ_F6Scxx . . $ SystemZ_F6S., SystemZ_F7Scxx . . $ SystemZ_F7S.,
52 SystemZ_F8Scxx . . $ SystemZ_F8S., SystemZ_F9Scxx . . $ SystemZ_F9S., SystemZ_F10Scxx . . $ SystemZ_F10S., SystemZ_F11Scxx . . $ SystemZ_F11S.,
53 SystemZ_F12Scxx . . $ SystemZ_F12S., SystemZ_F13Scxx . . $ SystemZ_F13S., SystemZ_F14Scxx . . $ SystemZ_F14S., SystemZ_F15Scxx . . $ SystemZ_F15S.
54 };
55
56 const unsigned SystemZMC_FP64Regscxx . . $ SystemZMC_FP64Regs.[16] = {
57 SystemZ_F0Dcxx . . $ SystemZ_F0D., SystemZ_F1Dcxx . . $ SystemZ_F1D., SystemZ_F2Dcxx . . $ SystemZ_F2D., SystemZ_F3Dcxx . . $ SystemZ_F3D.,
58 SystemZ_F4Dcxx . . $ SystemZ_F4D., SystemZ_F5Dcxx . . $ SystemZ_F5D., SystemZ_F6Dcxx . . $ SystemZ_F6D., SystemZ_F7Dcxx . . $ SystemZ_F7D.,
59 SystemZ_F8Dcxx . . $ SystemZ_F8D., SystemZ_F9Dcxx . . $ SystemZ_F9D., SystemZ_F10Dcxx . . $ SystemZ_F10D., SystemZ_F11Dcxx . . $ SystemZ_F11D.,
60 SystemZ_F12Dcxx . . $ SystemZ_F12D., SystemZ_F13Dcxx . . $ SystemZ_F13D., SystemZ_F14Dcxx . . $ SystemZ_F14D., SystemZ_F15Dcxx . . $ SystemZ_F15D.
61 };
62
63 const unsigned SystemZMC_FP128Regscxx . . $ SystemZMC_FP128Regs.[16] = {
64 SystemZ_F0Qcxx . . $ SystemZ_F0Q., SystemZ_F1Qcxx . . $ SystemZ_F1Q., 0, 0,
65 SystemZ_F4Qcxx . . $ SystemZ_F4Q., SystemZ_F5Qcxx . . $ SystemZ_F5Q., 0, 0,
66 SystemZ_F8Qcxx . . $ SystemZ_F8Q., SystemZ_F9Qcxx . . $ SystemZ_F9Q., 0, 0,
67 SystemZ_F12Qcxx . . $ SystemZ_F12Q., SystemZ_F13Qcxx . . $ SystemZ_F13Q., 0, 0
68 };
69
70 const unsigned SystemZMC_VR32Regscxx . . $ SystemZMC_VR32Regs.[32] = {
71 SystemZ_F0Scxx . . $ SystemZ_F0S., SystemZ_F1Scxx . . $ SystemZ_F1S., SystemZ_F2Scxx . . $ SystemZ_F2S., SystemZ_F3Scxx . . $ SystemZ_F3S.,
72 SystemZ_F4Scxx . . $ SystemZ_F4S., SystemZ_F5Scxx . . $ SystemZ_F5S., SystemZ_F6Scxx . . $ SystemZ_F6S., SystemZ_F7Scxx . . $ SystemZ_F7S.,
73 SystemZ_F8Scxx . . $ SystemZ_F8S., SystemZ_F9Scxx . . $ SystemZ_F9S., SystemZ_F10Scxx . . $ SystemZ_F10S., SystemZ_F11Scxx . . $ SystemZ_F11S.,
74 SystemZ_F12Scxx . . $ SystemZ_F12S., SystemZ_F13Scxx . . $ SystemZ_F13S., SystemZ_F14Scxx . . $ SystemZ_F14S., SystemZ_F15Scxx . . $ SystemZ_F15S.,
75 SystemZ_F16Scxx . . $ SystemZ_F16S., SystemZ_F17Scxx . . $ SystemZ_F17S., SystemZ_F18Scxx . . $ SystemZ_F18S., SystemZ_F19Scxx . . $ SystemZ_F19S.,
76 SystemZ_F20Scxx . . $ SystemZ_F20S., SystemZ_F21Scxx . . $ SystemZ_F21S., SystemZ_F22Scxx . . $ SystemZ_F22S., SystemZ_F23Scxx . . $ SystemZ_F23S.,
77 SystemZ_F24Scxx . . $ SystemZ_F24S., SystemZ_F25Scxx . . $ SystemZ_F25S., SystemZ_F26Scxx . . $ SystemZ_F26S., SystemZ_F27Scxx . . $ SystemZ_F27S.,
78 SystemZ_F28Scxx . . $ SystemZ_F28S., SystemZ_F29Scxx . . $ SystemZ_F29S., SystemZ_F30Scxx . . $ SystemZ_F30S., SystemZ_F31Scxx . . $ SystemZ_F31S.
79 };
80
81 const unsigned SystemZMC_VR64Regscxx . . $ SystemZMC_VR64Regs.[32] = {
82 SystemZ_F0Dcxx . . $ SystemZ_F0D., SystemZ_F1Dcxx . . $ SystemZ_F1D., SystemZ_F2Dcxx . . $ SystemZ_F2D., SystemZ_F3Dcxx . . $ SystemZ_F3D.,
83 SystemZ_F4Dcxx . . $ SystemZ_F4D., SystemZ_F5Dcxx . . $ SystemZ_F5D., SystemZ_F6Dcxx . . $ SystemZ_F6D., SystemZ_F7Dcxx . . $ SystemZ_F7D.,
84 SystemZ_F8Dcxx . . $ SystemZ_F8D., SystemZ_F9Dcxx . . $ SystemZ_F9D., SystemZ_F10Dcxx . . $ SystemZ_F10D., SystemZ_F11Dcxx . . $ SystemZ_F11D.,
85 SystemZ_F12Dcxx . . $ SystemZ_F12D., SystemZ_F13Dcxx . . $ SystemZ_F13D., SystemZ_F14Dcxx . . $ SystemZ_F14D., SystemZ_F15Dcxx . . $ SystemZ_F15D.,
86 SystemZ_F16Dcxx . . $ SystemZ_F16D., SystemZ_F17Dcxx . . $ SystemZ_F17D., SystemZ_F18Dcxx . . $ SystemZ_F18D., SystemZ_F19Dcxx . . $ SystemZ_F19D.,
87 SystemZ_F20Dcxx . . $ SystemZ_F20D., SystemZ_F21Dcxx . . $ SystemZ_F21D., SystemZ_F22Dcxx . . $ SystemZ_F22D., SystemZ_F23Dcxx . . $ SystemZ_F23D.,
88 SystemZ_F24Dcxx . . $ SystemZ_F24D., SystemZ_F25Dcxx . . $ SystemZ_F25D., SystemZ_F26Dcxx . . $ SystemZ_F26D., SystemZ_F27Dcxx . . $ SystemZ_F27D.,
89 SystemZ_F28Dcxx . . $ SystemZ_F28D., SystemZ_F29Dcxx . . $ SystemZ_F29D., SystemZ_F30Dcxx . . $ SystemZ_F30D., SystemZ_F31Dcxx . . $ SystemZ_F31D.
90 };
91
92 const unsigned SystemZMC_VR128Regscxx . . $ SystemZMC_VR128Regs.[32] = {
93 SystemZ_V0cxx . . $ SystemZ_V0., SystemZ_V1cxx . . $ SystemZ_V1., SystemZ_V2cxx . . $ SystemZ_V2., SystemZ_V3cxx . . $ SystemZ_V3.,
94 SystemZ_V4cxx . . $ SystemZ_V4., SystemZ_V5cxx . . $ SystemZ_V5., SystemZ_V6cxx . . $ SystemZ_V6., SystemZ_V7cxx . . $ SystemZ_V7.,
95 SystemZ_V8cxx . . $ SystemZ_V8., SystemZ_V9cxx . . $ SystemZ_V9., SystemZ_V10cxx . . $ SystemZ_V10., SystemZ_V11cxx . . $ SystemZ_V11.,
96 SystemZ_V12cxx . . $ SystemZ_V12., SystemZ_V13cxx . . $ SystemZ_V13., SystemZ_V14cxx . . $ SystemZ_V14., SystemZ_V15cxx . . $ SystemZ_V15.,
97 SystemZ_V16cxx . . $ SystemZ_V16., SystemZ_V17cxx . . $ SystemZ_V17., SystemZ_V18cxx . . $ SystemZ_V18., SystemZ_V19cxx . . $ SystemZ_V19.,
98 SystemZ_V20cxx . . $ SystemZ_V20., SystemZ_V21cxx . . $ SystemZ_V21., SystemZ_V22cxx . . $ SystemZ_V22., SystemZ_V23cxx . . $ SystemZ_V23.,
99 SystemZ_V24cxx . . $ SystemZ_V24., SystemZ_V25cxx . . $ SystemZ_V25., SystemZ_V26cxx . . $ SystemZ_V26., SystemZ_V27cxx . . $ SystemZ_V27.,
100 SystemZ_V28cxx . . $ SystemZ_V28., SystemZ_V29cxx . . $ SystemZ_V29., SystemZ_V30cxx . . $ SystemZ_V30., SystemZ_V31cxx . . $ SystemZ_V31.
101 };
102
103 const unsigned SystemZMC_AR32Regscxx . . $ SystemZMC_AR32Regs.[16] = {
104 SystemZ_A0cxx . . $ SystemZ_A0., SystemZ_A1cxx . . $ SystemZ_A1., SystemZ_A2cxx . . $ SystemZ_A2., SystemZ_A3cxx . . $ SystemZ_A3.,
105 SystemZ_A4cxx . . $ SystemZ_A4., SystemZ_A5cxx . . $ SystemZ_A5., SystemZ_A6cxx . . $ SystemZ_A6., SystemZ_A7cxx . . $ SystemZ_A7.,
106 SystemZ_A8cxx . . $ SystemZ_A8., SystemZ_A9cxx . . $ SystemZ_A9., SystemZ_A10cxx . . $ SystemZ_A10., SystemZ_A11cxx . . $ SystemZ_A11.,
107 SystemZ_A12cxx . . $ SystemZ_A12., SystemZ_A13cxx . . $ SystemZ_A13., SystemZ_A14cxx . . $ SystemZ_A14., SystemZ_A15cxx . . $ SystemZ_A15.
108 };
109
110 const unsigned SystemZMC_CR64Regscxx . . $ SystemZMC_CR64Regs.[16] = {
111 SystemZ_C0cxx . . $ SystemZ_C0., SystemZ_C1cxx . . $ SystemZ_C1., SystemZ_C2cxx . . $ SystemZ_C2., SystemZ_C3cxx . . $ SystemZ_C3.,
112 SystemZ_C4cxx . . $ SystemZ_C4., SystemZ_C5cxx . . $ SystemZ_C5., SystemZ_C6cxx . . $ SystemZ_C6., SystemZ_C7cxx . . $ SystemZ_C7.,
113 SystemZ_C8cxx . . $ SystemZ_C8., SystemZ_C9cxx . . $ SystemZ_C9., SystemZ_C10cxx . . $ SystemZ_C10., SystemZ_C11cxx . . $ SystemZ_C11.,
114 SystemZ_C12cxx . . $ SystemZ_C12., SystemZ_C13cxx . . $ SystemZ_C13., SystemZ_C14cxx . . $ SystemZ_C14., SystemZ_C15cxx . . $ SystemZ_C15.
115 };
116
117 /* All register classes that have 0-15. */
118 #define DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(N) \
119 [SystemZ_R ## N ## L] = N, \
120 [SystemZ_R ## N ## H] = N, \
121 [SystemZ_R ## N ## D] = N, \
122 [SystemZ_F ## N ## S] = N, \
123 [SystemZ_F ## N ## D] = N, \
124 [SystemZ_V ## N] = N, \
125 [SystemZ_A ## N] = N, \
126 [SystemZ_C ## N] = N
127
128 /* All register classes that (also) have 16-31. */
129 #define DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(N) \
130 [SystemZ_F ## N ## S] = N, \
131 [SystemZ_F ## N ## D] = N, \
132 [SystemZ_V ## N] = N
133
134 static const uint8_tcxx . . $ uint8_t# Mapcxx . . $ Map.[SystemZ_NUM_TARGET_REGScxx . . $ SystemZ_NUM_TARGET_REGS.] = {
135 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(0),
136 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(1),
137 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(2),
138 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(3),
139 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(4),
140 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(5),
141 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(6),
142 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(8),
143 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(9),
144 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(10),
145 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(11),
146 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(12),
147 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(13),
148 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(14),
149 DEF_REG16cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:118:9`!(15),
150
151 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(16),
152 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(17),
153 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(18),
154 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(19),
155 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(20),
156 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(21),
157 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(22),
158 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(23),
159 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(24),
160 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(25),
161 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(26),
162 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(27),
163 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(28),
164 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(29),
165 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(30),
166 DEF_REG32cxx . . $ `arch/SystemZ/SystemZMCTargetDesc.c:129:9`!(31),
167
168 /* The float Q registers are non-sequential. */
169 [SystemZ_F0Qcxx . . $ SystemZ_F0Q.] = 0,
170 [SystemZ_F1Qcxx . . $ SystemZ_F1Q.] = 1,
171 [SystemZ_F4Qcxx . . $ SystemZ_F4Q.] = 4,
172 [SystemZ_F5Qcxx . . $ SystemZ_F5Q.] = 5,
173 [SystemZ_F8Qcxx . . $ SystemZ_F8Q.] = 8,
174 [SystemZ_F9Qcxx . . $ SystemZ_F9Q.] = 9,
175 [SystemZ_F12Qcxx . . $ SystemZ_F12Q.] = 12,
176 [SystemZ_F13Qcxx . . $ SystemZ_F13Q.] = 13,
177
178 /* The integer Q registers are all even. */
179 [SystemZ_R0Qcxx . . $ SystemZ_R0Q.] = 0,
180 [SystemZ_R2Qcxx . . $ SystemZ_R2Q.] = 2,
181 [SystemZ_R4Qcxx . . $ SystemZ_R4Q.] = 4,
182 [SystemZ_R6Qcxx . . $ SystemZ_R6Q.] = 6,
183 [SystemZ_R8Qcxx . . $ SystemZ_R8Q.] = 8,
184 [SystemZ_R10Qcxx . . $ SystemZ_R10Q.] = 10,
185 [SystemZ_R12Qcxx . . $ SystemZ_R12Q.] = 12,
186 [SystemZ_R14Qcxx . . $ SystemZ_R14Q.] = 14,
187 };
188
189 unsigned SystemZMC_getFirstRegcxx . . $ SystemZMC_getFirstReg(2141b656ce2cc063).(unsigned Reg)
190 {
191 // assert(Reg < SystemZ_NUM_TARGET_REGS);
192 return Mapcxx . . $ Map.[Reg];
193 }
194
195 #endif