1 # Copyright 2011-2013 Xamarin, Inc (http://www.xamarin.com)
2 # Copyright 2003-2011 Novell, Inc (http://www.novell.com)
3 # Licensed under the MIT license. See LICENSE file in the project root for full license information.
4 # arm64 cpu description file
5 # this file is read by genmdesc to pruduce a table with all the relevant information
6 # about the cpu instructions that may be used by the regsiter allocator, the scheduler
7 # and other parts of the arch-dependent part of mini.
9 # An opcode name is followed by a colon and optional specifiers.
10 # A specifier has a name, a colon and a value. Specifiers are separated by white space.
11 # Here is a description of the specifiers valid for this file and their possible values.
13 # dest:register describes the destination register of an instruction
14 # src1:register describes the first source register of an instruction
15 # src2:register describes the second source register of an instruction
17 # register may have the following values:
19 # a r3 register (output from calls)
20 # b base register (used in address references)
21 # f floating point register
22 # g floating point register returned in r0:r1 for soft-float mode
24 # len:number describe the maximun length in bytes of the instruction
25 # number is a positive integer
27 # cost:number describe how many cycles are needed to complete the instruction (unused)
29 # clob:spec describe if the instruction clobbers registers or has special needs
31 # spec can be one of the following characters:
32 # c clobbers caller-save registers
33 # r 'reserves' the destination register until a later instruction unreserves it
34 # used mostly to set output registers in function calls
36 # flags:spec describe if the instruction uses or sets the flags (unused)
38 # spec can be one of the following chars:
41 # m uses and modifies the flags
43 # res:spec describe what units are used in the processor (unused)
45 # delay: describe delay slots (unused)
47 # the required specifiers are: len, clob (if registers are clobbered), the registers
48 # specifiers if the registers are actually used, flags (when scheduling is implemented).
50 # See the code in mini-x86.c for more details on how the specifiers are used.
58 # See the comment in resume_from_signal_handler, we can't copy the fp regs from sigctx to MonoContext on linux,
59 # since the corresponding sigctx structures are not well defined.
60 seq_point: len:40 clob:c
64 rethrow: src1:i len:20
67 call_handler: len:16 clob:c
68 endfilter: src1:i len:32
69 get_ex_obj: dest:i len:16
71 ckfinite: dest:f src1:f len:64
77 localloc: dest:i src1:i len:96
78 compare: src1:i src2:i len:4
79 compare_imm: src1:i len:20
80 fcompare: src1:f src2:f len:12
81 rcompare: src1:f src2:f len:12
82 oparglist: src1:i len:12
83 setlret: src1:i src2:i len:12
84 checkthis: src1:b len:4
85 call: dest:a clob:c len:32
86 call_reg: dest:a src1:i len:32 clob:c
87 call_membase: dest:a src1:b len:32 clob:c
88 voidcall: len:32 clob:c
89 voidcall_reg: src1:i len:32 clob:c
90 voidcall_membase: src1:b len:32 clob:c
91 fcall: dest:f len:32 clob:c
92 fcall_reg: dest:f src1:i len:32 clob:c
93 fcall_membase: dest:f src1:b len:32 clob:c
94 rcall: dest:f len:32 clob:c
95 rcall_reg: dest:f src1:i len:32 clob:c
96 rcall_membase: dest:f src1:b len:32 clob:c
97 lcall: dest:l len:32 clob:c
98 lcall_reg: dest:l src1:i len:32 clob:c
99 lcall_membase: dest:l src1:b len:32 clob:c
101 vcall_reg: src1:i len:32 clob:c
102 vcall_membase: src1:b len:32 clob:c
103 tailcall: len:64 clob:c
104 iconst: dest:i len:16
105 r4const: dest:f len:24
106 r8const: dest:f len:20
108 store_membase_imm: dest:b len:20
109 store_membase_reg: dest:b src1:i len:20
110 storei1_membase_imm: dest:b len:20
111 storei1_membase_reg: dest:b src1:i len:12
112 storei2_membase_imm: dest:b len:20
113 storei2_membase_reg: dest:b src1:i len:12
114 storei4_membase_imm: dest:b len:20
115 storei4_membase_reg: dest:b src1:i len:20
116 storer4_membase_reg: dest:b src1:f len:20
117 storer8_membase_reg: dest:b src1:f len:24
118 store_memindex: dest:b src1:i src2:i len:4
119 storei1_memindex: dest:b src1:i src2:i len:4
120 storei2_memindex: dest:b src1:i src2:i len:4
121 storei4_memindex: dest:b src1:i src2:i len:4
122 load_membase: dest:i src1:b len:20
123 loadi1_membase: dest:i src1:b len:32
124 loadu1_membase: dest:i src1:b len:32
125 loadi2_membase: dest:i src1:b len:32
126 loadu2_membase: dest:i src1:b len:32
127 loadi4_membase: dest:i src1:b len:32
128 loadu4_membase: dest:i src1:b len:32
129 loadr4_membase: dest:f src1:b len:32
130 loadr8_membase: dest:f src1:b len:32
131 load_memindex: dest:i src1:b src2:i len:4
132 loadi1_memindex: dest:i src1:b src2:i len:4
133 loadu1_memindex: dest:i src1:b src2:i len:4
134 loadi2_memindex: dest:i src1:b src2:i len:4
135 loadu2_memindex: dest:i src1:b src2:i len:4
136 loadi4_memindex: dest:i src1:b src2:i len:4
137 loadu4_memindex: dest:i src1:b src2:i len:4
138 loadu4_mem: dest:i len:8
139 move: dest:i src1:i len:4
140 fmove: dest:f src1:f len:4
141 rmove: dest:f src1:f len:4
142 move_f_to_i4: dest:i src1:f len:8
143 move_i4_to_f: dest:f src1:i len:8
144 move_f_to_i8: dest:i src1:f len:4
145 move_i8_to_f: dest:f src1:i len:4
146 add_imm: dest:i src1:i len:12
147 sub_imm: dest:i src1:i len:12
148 mul_imm: dest:i src1:i len:12
149 and_imm: dest:i src1:i len:12
150 or_imm: dest:i src1:i len:12
151 xor_imm: dest:i src1:i len:12
152 shl_imm: dest:i src1:i len:8
153 shr_imm: dest:i src1:i len:8
154 shr_un_imm: dest:i src1:i len:8
156 cond_exc_ne_un: len:8
158 cond_exc_lt_un: len:8
160 cond_exc_gt_un: len:8
162 cond_exc_ge_un: len:8
164 cond_exc_le_un: len:8
169 #float_beq: src1:f src2:f len:20
170 #float_bne_un: src1:f src2:f len:20
171 #float_blt: src1:f src2:f len:20
172 #float_blt_un: src1:f src2:f len:20
173 #float_bgt: src1:f src2:f len:20
174 #float_bgt_un: src1:f src2:f len:20
175 #float_bge: src1:f src2:f len:20
176 #float_bge_un: src1:f src2:f len:20
177 #float_ble: src1:f src2:f len:20
178 #float_ble_un: src1:f src2:f len:20
179 float_add: dest:f src1:f src2:f len:4
180 float_sub: dest:f src1:f src2:f len:4
181 float_mul: dest:f src1:f src2:f len:4
182 float_div: dest:f src1:f src2:f len:4
183 float_div_un: dest:f src1:f src2:f len:4
184 float_rem: dest:f src1:f src2:f len:16
185 float_rem_un: dest:f src1:f src2:f len:16
186 float_neg: dest:f src1:f len:4
187 float_not: dest:f src1:f len:4
188 float_conv_to_i1: dest:i src1:f len:40
189 float_conv_to_i2: dest:i src1:f len:40
190 float_conv_to_i4: dest:i src1:f len:40
191 float_conv_to_i8: dest:l src1:f len:40
192 float_conv_to_r4: dest:f src1:f len:8
193 float_conv_to_u4: dest:i src1:f len:40
194 float_conv_to_u8: dest:l src1:f len:40
195 float_conv_to_u2: dest:i src1:f len:40
196 float_conv_to_u1: dest:i src1:f len:40
197 float_conv_to_i: dest:i src1:f len:40
198 float_ceq: dest:i src1:f src2:f len:16
199 float_cgt: dest:i src1:f src2:f len:16
200 float_cgt_un: dest:i src1:f src2:f len:20
201 float_clt: dest:i src1:f src2:f len:16
202 float_clt_un: dest:i src1:f src2:f len:20
203 float_cneq: dest:i src1:f src2:f len:20
204 float_cge: dest:i src1:f src2:f len:20
205 float_cle: dest:i src1:f src2:f len:20
206 float_conv_to_u: dest:i src1:f len:36
207 setfret: src1:f len:12
210 r4_conv_to_i1: dest:i src1:f len:8
211 r4_conv_to_u1: dest:i src1:f len:8
212 r4_conv_to_i2: dest:i src1:f len:8
213 r4_conv_to_u2: dest:i src1:f len:8
214 r4_conv_to_i4: dest:i src1:f len:8
215 r4_conv_to_u4: dest:i src1:f len:8
216 r4_conv_to_i8: dest:l src1:f len:8
217 r4_conv_to_u8: dest:l src1:f len:8
218 r4_conv_to_r4: dest:f src1:f len:4
219 r4_conv_to_r8: dest:f src1:f len:4
220 r4_add: dest:f src1:f src2:f len:4
221 r4_sub: dest:f src1:f src2:f len:4
222 r4_mul: dest:f src1:f src2:f len:4
223 r4_div: dest:f src1:f src2:f len:4
224 r4_rem: dest:f src1:f src2:f len:16
225 r4_neg: dest:f src1:f len:4
226 r4_ceq: dest:i src1:f src2:f len:16
227 r4_cgt: dest:i src1:f src2:f len:16
228 r4_cgt_un: dest:i src1:f src2:f len:20
229 r4_clt: dest:i src1:f src2:f len:16
230 r4_clt_un: dest:i src1:f src2:f len:20
231 r4_cneq: dest:i src1:f src2:f len:20
232 r4_cge: dest:i src1:f src2:f len:20
233 r4_cle: dest:i src1:f src2:f len:20
235 aot_const: dest:i len:16
236 objc_get_selector: dest:i len:32
237 sqrt: dest:f src1:f len:4
238 adc: dest:i src1:i src2:i len:4
239 addcc: dest:i src1:i src2:i len:4
240 subcc: dest:i src1:i src2:i len:4
241 adc_imm: dest:i src1:i len:12
242 addcc_imm: dest:i src1:i len:12
243 subcc_imm: dest:i src1:i len:12
244 sbb: dest:i src1:i src2:i len:4
245 sbb_imm: dest:i src1:i len:12
247 bigmul: len:8 dest:l src1:i src2:i
248 bigmul_un: len:8 dest:l src1:i src2:i
249 tls_get: dest:i len:32
250 tls_get_reg: dest:i src1:i len:32
251 tls_set: src1:i len:32
252 tls_set_reg: src1:i src2:i len:32
255 int_add: dest:i src1:i src2:i len:4
256 int_sub: dest:i src1:i src2:i len:4
257 int_mul: dest:i src1:i src2:i len:4
258 int_div: dest:i src1:i src2:i len:72
259 int_div_un: dest:i src1:i src2:i len:72
260 int_rem: dest:i src1:i src2:i len:72
261 int_rem_un: dest:i src1:i src2:i len:72
262 int_and: dest:i src1:i src2:i len:4
263 int_or: dest:i src1:i src2:i len:4
264 int_xor: dest:i src1:i src2:i len:4
265 int_shl: dest:i src1:i src2:i len:4
266 int_shr: dest:i src1:i src2:i len:4
267 int_shr_un: dest:i src1:i src2:i len:4
268 int_neg: dest:i src1:i len:4
269 int_not: dest:i src1:i len:4
270 int_conv_to_i1: dest:i src1:i len:8
271 int_conv_to_i2: dest:i src1:i len:8
272 int_conv_to_i4: dest:i src1:i len:4
273 int_conv_to_r4: dest:f src1:i len:36
274 int_conv_to_r8: dest:f src1:i len:36
275 int_conv_to_u4: dest:i src1:i
276 int_conv_to_r_un: dest:f src1:i len:56
277 int_conv_to_u2: dest:i src1:i len:8
278 int_conv_to_u1: dest:i src1:i len:4
289 int_add_ovf: dest:i src1:i src2:i len:16
290 int_add_ovf_un: dest:i src1:i src2:i len:16
291 int_mul_ovf: dest:i src1:i src2:i len:16
292 int_mul_ovf_un: dest:i src1:i src2:i len:16
293 int_sub_ovf: dest:i src1:i src2:i len:16
294 int_sub_ovf_un: dest:i src1:i src2:i len:16
295 add_ovf_carry: dest:i src1:i src2:i len:16
296 sub_ovf_carry: dest:i src1:i src2:i len:16
297 add_ovf_un_carry: dest:i src1:i src2:i len:16
298 sub_ovf_un_carry: dest:i src1:i src2:i len:16
300 arm_rsbs_imm: dest:i src1:i len:4
301 arm_rsc_imm: dest:i src1:i len:4
304 dummy_use: src1:i len:0
307 not_null: src1:i len:0
309 int_adc: dest:i src1:i src2:i len:4
310 int_addcc: dest:i src1:i src2:i len:4
311 int_subcc: dest:i src1:i src2:i len:4
312 int_sbb: dest:i src1:i src2:i len:4
313 int_adc_imm: dest:i src1:i len:12
314 int_sbb_imm: dest:i src1:i len:12
316 int_add_imm: dest:i src1:i len:12
317 int_sub_imm: dest:i src1:i len:12
318 int_mul_imm: dest:i src1:i len:12
319 int_div_imm: dest:i src1:i len:20
320 int_div_un_imm: dest:i src1:i len:12
321 int_rem_imm: dest:i src1:i len:28
322 int_rem_un_imm: dest:i src1:i len:16
323 int_and_imm: dest:i src1:i len:12
324 int_or_imm: dest:i src1:i len:12
325 int_xor_imm: dest:i src1:i len:12
326 int_shl_imm: dest:i src1:i len:8
327 int_shr_imm: dest:i src1:i len:8
328 int_shr_un_imm: dest:i src1:i len:8
330 int_ceq: dest:i len:12
331 int_cgt: dest:i len:12
332 int_cgt_un: dest:i len:12
333 int_clt: dest:i len:12
334 int_clt_un: dest:i len:12
336 int_cneq: dest:i len:12
337 int_cge: dest:i len:12
338 int_cle: dest:i len:12
339 int_cge_un: dest:i len:12
340 int_cle_un: dest:i len:12
343 cond_exc_ine_un: len:16
345 cond_exc_ilt_un: len:16
347 cond_exc_igt_un: len:16
349 cond_exc_ige_un: len:16
351 cond_exc_ile_un: len:16
357 icompare: src1:i src2:i len:4
358 icompare_imm: src1:i len:12
360 long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:36
362 vcall2: len:40 clob:c
363 vcall2_reg: src1:i len:40 clob:c
364 vcall2_membase: src1:b len:40 clob:c
365 dyn_call: src1:i src2:i len:192 clob:c
367 # This is different from the original JIT opcodes
379 liverange_start: len:0
381 gc_liveness_def: len:0
382 gc_liveness_use: len:0
383 gc_spill_slot_liveness_def: len:0
384 gc_param_slot_liveness_def: len:0
387 i8const: dest:i len:16
388 sext_i4: dest:i src1:i len:4
389 zext_i4: dest:i src1:i len:4
390 jump_table: dest:i len:16
391 long_add: dest:i src1:i src2:i len:4
392 long_sub: dest:i src1:i src2:i len:4
393 long_mul: dest:i src1:i src2:i len:4
394 long_div: dest:i src1:i src2:i len:80
395 long_div_un: dest:i src1:i src2:i len:64
396 long_rem: dest:i src1:i src2:i len:80
397 long_rem_un: dest:i src1:i src2:i len:64
398 long_and: dest:i src1:i src2:i len:4
399 long_or: dest:i src1:i src2:i len:4
400 long_xor: dest:i src1:i src2:i len:4
401 long_shl: dest:i src1:i src2:i len:4
402 long_shr: dest:i src1:i src2:i len:4
403 long_shr_un: dest:i src1:i src2:i len:4
404 long_neg: dest:i src1:i len:4
405 long_not: dest:i src1:i len:4
406 long_add_imm: dest:i src1:i len:12
407 long_sub_imm: dest:i src1:i len:12
408 long_mul_imm: dest:i src1:i len:12
409 long_and_imm: dest:i src1:i len:12
410 long_or_imm: dest:i src1:i len:12
411 long_xor_imm: dest:i src1:i len:12
412 long_shl_imm: dest:i src1:i len:12
413 long_shr_imm: dest:i src1:i len:12
414 long_shr_un_imm: dest:i src1:i len:12
415 long_add_ovf: dest:i src1:i src2:i len:16
416 long_add_ovf_un: dest:i src1:i src2:i len:16
417 long_mul_ovf: dest:i src1:i src2:i len:16
418 long_mul_ovf_un: dest:i src1:i src2:i len:16
419 long_sub_ovf: dest:i src1:i src2:i len:16
420 long_sub_ovf_un: dest:i src1:i src2:i len:16
421 lcompare: src1:i src2:i len:4
422 lcompare_imm: src1:i len:20
433 long_ceq: dest:i len:12
434 long_cgt: dest:i len:12
435 long_cgt_un: dest:i len:12
436 long_clt: dest:i len:12
437 long_clt_un: dest:i len:12
438 long_conv_to_i1: dest:i src1:i len:4
439 long_conv_to_i2: dest:i src1:i len:4
440 long_conv_to_u1: dest:i src1:i len:4
441 long_conv_to_u2: dest:i src1:i len:4
442 long_conv_to_r8: dest:f src1:i len:8
443 long_conv_to_r4: dest:f src1:i len:12
444 loadi8_membase: dest:i src1:b len:12
445 storei8_membase_imm: dest:b len:20
446 storei8_membase_reg: dest:b src1:i len:12
447 long_conv_to_r_un: dest:f src1:i len:8
448 arm_setfreg_r4: dest:f src1:f len:8
449 localloc_imm: dest:i len:64
450 arm64_cbzw: src1:i len:16
451 arm64_cbzx: src1:i len:16
452 arm64_cbnzw: src1:i len:16
453 arm64_cbnzx: src1:i len:16
455 atomic_add_i4: dest:i src1:i src2:i len:32
456 atomic_add_i8: dest:i src1:i src2:i len:32
457 atomic_exchange_i4: dest:i src1:i src2:i len:32
458 atomic_exchange_i8: dest:i src1:i src2:i len:32
459 atomic_cas_i4: dest:i src1:i src2:i src3:i len:32
460 atomic_cas_i8: dest:i src1:i src2:i src3:i len:32
461 memory_barrier: len:8 clob:a
462 atomic_load_i1: dest:i src1:b len:24
463 atomic_load_u1: dest:i src1:b len:24
464 atomic_load_i2: dest:i src1:b len:24
465 atomic_load_u2: dest:i src1:b len:24
466 atomic_load_i4: dest:i src1:b len:24
467 atomic_load_u4: dest:i src1:b len:24
468 atomic_load_i8: dest:i src1:b len:20
469 atomic_load_u8: dest:i src1:b len:20
470 atomic_load_r4: dest:f src1:b len:28
471 atomic_load_r8: dest:f src1:b len:24
472 atomic_store_i1: dest:b src1:i len:20
473 atomic_store_u1: dest:b src1:i len:20
474 atomic_store_i2: dest:b src1:i len:20
475 atomic_store_u2: dest:b src1:i len:20
476 atomic_store_i4: dest:b src1:i len:20
477 atomic_store_u4: dest:b src1:i len:20
478 atomic_store_i8: dest:b src1:i len:20
479 atomic_store_u8: dest:b src1:i len:20
480 atomic_store_r4: dest:b src1:f len:28
481 atomic_store_r8: dest:b src1:f len:24
483 generic_class_init: src1:a len:44 clob:c
484 gc_safe_point: src1:i len:12 clob:c