1 # arm cpu description file
2 # this file is read by genmdesc to pruduce a table with all the relevant information
3 # about the cpu instructions that may be used by the regsiter allocator, the scheduler
4 # and other parts of the arch-dependent part of mini.
6 # An opcode name is followed by a colon and optional specifiers.
7 # A specifier has a name, a colon and a value. Specifiers are separated by white space.
8 # Here is a description of the specifiers valid for this file and their possible values.
10 # dest:register describes the destination register of an instruction
11 # src1:register describes the first source register of an instruction
12 # src2:register describes the second source register of an instruction
14 # register may have the following values:
16 # a r3 register (output from calls)
17 # b base register (used in address references)
18 # f floating point register
19 # g floating point register returned in r0:r1 for soft-float mode
21 # len:number describe the maximun length in bytes of the instruction
22 # number is a positive integer
24 # cost:number describe how many cycles are needed to complete the instruction (unused)
26 # clob:spec describe if the instruction clobbers registers or has special needs
28 # spec can be one of the following characters:
29 # c clobbers caller-save registers
30 # r 'reserves' the destination register until a later instruction unreserves it
31 # used mostly to set output registers in function calls
33 # flags:spec describe if the instruction uses or sets the flags (unused)
35 # spec can be one of the following chars:
38 # m uses and modifies the flags
40 # res:spec describe what units are used in the processor (unused)
42 # delay: describe delay slots (unused)
44 # the required specifiers are: len, clob (if registers are clobbered), the registers
45 # specifiers if the registers are actually used, flags (when scheduling is implemented).
47 # See the code in mini-x86.c for more details on how the specifiers are used.
59 rethrow: src1:i len:20
62 call_handler: len:12 clob:c
63 endfilter: src1:i len:16
65 ckfinite: dest:f src1:f len:64
71 localloc: dest:i src1:i len:60
72 compare: src1:i src2:i len:4
73 compare_imm: src1:i len:12
74 fcompare: src1:f src2:f len:12
75 oparglist: src1:i len:12
76 setlret: src1:i src2:i len:12
77 checkthis: src1:b len:4
78 call: dest:a clob:c len:20
79 call_reg: dest:a src1:i len:8 clob:c
80 call_membase: dest:a src1:b len:12 clob:c
81 voidcall: len:20 clob:c
82 voidcall_reg: src1:i len:8 clob:c
83 voidcall_membase: src1:b len:12 clob:c
84 fcall: dest:g len:28 clob:c
85 fcall_reg: dest:g src1:i len:16 clob:c
86 fcall_membase: dest:g src1:b len:20 clob:c
87 lcall: dest:l len:20 clob:c
88 lcall_reg: dest:l src1:i len:8 clob:c
89 lcall_membase: dest:l src1:b len:12 clob:c
91 vcall_reg: src1:i len:8 clob:c
92 vcall_membase: src1:b len:12 clob:c
94 r4const: dest:f len:20
95 r8const: dest:f len:20
97 store_membase_imm: dest:b len:20
98 store_membase_reg: dest:b src1:i len:20
99 storei1_membase_imm: dest:b len:20
100 storei1_membase_reg: dest:b src1:i len:12
101 storei2_membase_imm: dest:b len:20
102 storei2_membase_reg: dest:b src1:i len:12
103 storei4_membase_imm: dest:b len:20
104 storei4_membase_reg: dest:b src1:i len:20
105 storei8_membase_imm: dest:b
106 storei8_membase_reg: dest:b src1:i
107 storer4_membase_reg: dest:b src1:f len:12
108 storer8_membase_reg: dest:b src1:f len:24
109 store_memindex: dest:b src1:i src2:i len:4
110 storei1_memindex: dest:b src1:i src2:i len:4
111 storei2_memindex: dest:b src1:i src2:i len:4
112 storei4_memindex: dest:b src1:i src2:i len:4
113 load_membase: dest:i src1:b len:20
114 loadi1_membase: dest:i src1:b len:4
115 loadu1_membase: dest:i src1:b len:4
116 loadi2_membase: dest:i src1:b len:4
117 loadu2_membase: dest:i src1:b len:4
118 loadi4_membase: dest:i src1:b len:4
119 loadu4_membase: dest:i src1:b len:4
120 loadi8_membase: dest:i src1:b
121 loadr4_membase: dest:f src1:b len:8
122 loadr8_membase: dest:f src1:b len:24
123 load_memindex: dest:i src1:b src2:i len:4
124 loadi1_memindex: dest:i src1:b src2:i len:4
125 loadu1_memindex: dest:i src1:b src2:i len:4
126 loadi2_memindex: dest:i src1:b src2:i len:4
127 loadu2_memindex: dest:i src1:b src2:i len:4
128 loadi4_memindex: dest:i src1:b src2:i len:4
129 loadu4_memindex: dest:i src1:b src2:i len:4
130 loadu4_mem: dest:i len:8
131 move: dest:i src1:i len:4
132 fmove: dest:f src1:f len:4
133 add_imm: dest:i src1:i len:12
134 sub_imm: dest:i src1:i len:12
135 mul_imm: dest:i src1:i len:12
136 and_imm: dest:i src1:i len:12
137 or_imm: dest:i src1:i len:12
138 xor_imm: dest:i src1:i len:12
139 shl_imm: dest:i src1:i len:8
140 shr_imm: dest:i src1:i len:8
141 shr_un_imm: dest:i src1:i len:8
143 cond_exc_ne_un: len:8
145 cond_exc_lt_un: len:8
147 cond_exc_gt_un: len:8
149 cond_exc_ge_un: len:8
151 cond_exc_le_un: len:8
156 #float_beq: src1:f src2:f len:20
157 #float_bne_un: src1:f src2:f len:20
158 #float_blt: src1:f src2:f len:20
159 #float_blt_un: src1:f src2:f len:20
160 #float_bgt: src1:f src2:f len:20
161 #float_bgt_un: src1:f src2:f len:20
162 #float_bge: src1:f src2:f len:20
163 #float_bge_un: src1:f src2:f len:20
164 #float_ble: src1:f src2:f len:20
165 #float_ble_un: src1:f src2:f len:20
166 float_add: dest:f src1:f src2:f len:4
167 float_sub: dest:f src1:f src2:f len:4
168 float_mul: dest:f src1:f src2:f len:4
169 float_div: dest:f src1:f src2:f len:4
170 float_div_un: dest:f src1:f src2:f len:4
171 float_rem: dest:f src1:f src2:f len:16
172 float_rem_un: dest:f src1:f src2:f len:16
173 float_neg: dest:f src1:f len:4
174 float_not: dest:f src1:f len:4
175 float_conv_to_i1: dest:i src1:f len:40
176 float_conv_to_i2: dest:i src1:f len:40
177 float_conv_to_i4: dest:i src1:f len:40
178 float_conv_to_i8: dest:l src1:f len:40
179 float_conv_to_r4: dest:f src1:f len:8
180 float_conv_to_u4: dest:i src1:f len:40
181 float_conv_to_u8: dest:l src1:f len:40
182 float_conv_to_u2: dest:i src1:f len:40
183 float_conv_to_u1: dest:i src1:f len:40
184 float_conv_to_i: dest:i src1:f len:40
185 float_ceq: dest:i src1:f src2:f len:16
186 float_cgt: dest:i src1:f src2:f len:16
187 float_cgt_un: dest:i src1:f src2:f len:20
188 float_clt: dest:i src1:f src2:f len:16
189 float_clt_un: dest:i src1:f src2:f len:20
190 float_conv_to_u: dest:i src1:f len:36
191 setfret: src1:f len:12
192 aot_const: dest:i len:16
193 sqrt: dest:f src1:f len:4
194 adc: dest:i src1:i src2:i len:4
195 addcc: dest:i src1:i src2:i len:4
196 subcc: dest:i src1:i src2:i len:4
197 adc_imm: dest:i src1:i len:12
198 addcc_imm: dest:i src1:i len:12
199 subcc_imm: dest:i src1:i len:12
200 sbb: dest:i src1:i src2:i len:4
201 sbb_imm: dest:i src1:i len:12
203 bigmul: len:8 dest:l src1:i src2:i
204 bigmul_un: len:8 dest:l src1:i src2:i
205 tls_get: len:8 dest:i
208 int_add: dest:i src1:i src2:i len:4
209 int_sub: dest:i src1:i src2:i len:4
210 int_mul: dest:i src1:i src2:i len:4
211 int_div: dest:i src1:i src2:i len:40
212 int_div_un: dest:i src1:i src2:i len:16
213 int_rem: dest:i src1:i src2:i len:48
214 int_rem_un: dest:i src1:i src2:i len:24
215 int_and: dest:i src1:i src2:i len:4
216 int_or: dest:i src1:i src2:i len:4
217 int_xor: dest:i src1:i src2:i len:4
218 int_shl: dest:i src1:i src2:i len:4
219 int_shr: dest:i src1:i src2:i len:4
220 int_shr_un: dest:i src1:i src2:i len:4
221 int_neg: dest:i src1:i len:4
222 int_not: dest:i src1:i len:4
223 int_conv_to_i1: dest:i src1:i len:8
224 int_conv_to_i2: dest:i src1:i len:8
225 int_conv_to_i4: dest:i src1:i len:4
226 int_conv_to_r4: dest:f src1:i len:36
227 int_conv_to_r8: dest:f src1:i len:36
228 int_conv_to_u4: dest:i src1:i
229 int_conv_to_r_un: dest:f src1:i len:56
230 int_conv_to_u2: dest:i src1:i len:8
231 int_conv_to_u1: dest:i src1:i len:4
242 int_add_ovf: dest:i src1:i src2:i len:16
243 int_add_ovf_un: dest:i src1:i src2:i len:16
244 int_mul_ovf: dest:i src1:i src2:i len:16
245 int_mul_ovf_un: dest:i src1:i src2:i len:16
246 int_sub_ovf: dest:i src1:i src2:i len:16
247 int_sub_ovf_un: dest:i src1:i src2:i len:16
248 add_ovf_carry: dest:i src1:i src2:i len:16
249 sub_ovf_carry: dest:i src1:i src2:i len:16
250 add_ovf_un_carry: dest:i src1:i src2:i len:16
251 sub_ovf_un_carry: dest:i src1:i src2:i len:16
253 arm_rsbs_imm: dest:i src1:i len:4
254 arm_rsc_imm: dest:i src1:i len:4
257 dummy_use: src1:i len:0
260 not_null: src1:i len:0
262 int_adc: dest:i src1:i src2:i len:4
263 int_addcc: dest:i src1:i src2:i len:4
264 int_subcc: dest:i src1:i src2:i len:4
265 int_sbb: dest:i src1:i src2:i len:4
266 int_adc_imm: dest:i src1:i len:12
267 int_sbb_imm: dest:i src1:i len:12
269 int_add_imm: dest:i src1:i len:12
270 int_sub_imm: dest:i src1:i len:12
271 int_mul_imm: dest:i src1:i len:12
272 int_div_imm: dest:i src1:i len:20
273 int_div_un_imm: dest:i src1:i len:12
274 int_rem_imm: dest:i src1:i len:28
275 int_rem_un_imm: dest:i src1:i len:16
276 int_and_imm: dest:i src1:i len:12
277 int_or_imm: dest:i src1:i len:12
278 int_xor_imm: dest:i src1:i len:12
279 int_shl_imm: dest:i src1:i len:8
280 int_shr_imm: dest:i src1:i len:8
281 int_shr_un_imm: dest:i src1:i len:8
283 int_ceq: dest:i len:12
284 int_cgt: dest:i len:12
285 int_cgt_un: dest:i len:12
286 int_clt: dest:i len:12
287 int_clt_un: dest:i len:12
290 cond_exc_ine_un: len:8
292 cond_exc_ilt_un: len:8
294 cond_exc_igt_un: len:8
296 cond_exc_ige_un: len:8
298 cond_exc_ile_un: len:8
304 icompare: src1:i src2:i len:4
305 icompare_imm: src1:i len:12
307 long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:36
309 vcall2: len:20 clob:c
310 vcall2_reg: src1:i len:8 clob:c
311 vcall2_membase: src1:b len:12 clob:c
312 dyn_call: src1:i src2:i len:128 clob:c
314 # This is different from the original JIT opcodes