1 # sparc32 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 # b base register (used in address references)
17 # f floating point register
19 # len:number describe the maximun length in bytes of the instruction
20 # number is a positive integer
22 # cost:number describe how many cycles are needed to complete the instruction (unused)
24 # clob:spec describe if the instruction clobbers registers or has special needs
26 # spec can be one of the following characters:
27 # c clobbers caller-save registers
28 # r 'reserves' the destination register until a later instruction unreserves it
29 # used mostly to set output registers in function calls
31 # flags:spec describe if the instruction uses or sets the flags (unused)
33 # spec can be one of the following chars:
36 # m uses and modifies the flags
38 # res:spec describe what units are used in the processor (unused)
40 # delay: describe delay slots (unused)
42 # the required specifiers are: len, clob (if registers are clobbered), the registers
43 # specifiers if the registers are actually used, flags (when scheduling is implemented).
45 # See the code in mini-sparc32.c for more details on how the specifiers are used.
86 call: dest:i clob:c len:4
116 ldind.i1: dest:i len:4
117 ldind.u1: dest:i len:4
118 ldind.i2: dest:i len:4
119 ldind.u2: dest:i len:4
120 ldind.i4: dest:i len:4
121 ldind.u4: dest:i len:4
123 ldind.i: dest:i len:4
126 ldind.ref: dest:i len:4
127 stind.ref: src1:b src2:i
128 stind.i1: src1:b src2:i
129 stind.i2: src1:b src2:i
130 stind.i4: src1:b src2:i
132 stind.r4: src1:b src2:f
133 stind.r8: src1:b src2:f
134 add: dest:i src1:i src2:i len:4
135 sub: dest:i src1:i src2:i len:4
136 mul: dest:i src1:i src2:i len:4
137 div: dest:i src1:i src2:i len:4
138 div.un: dest:i src1:i src2:i len:4
139 rem: dest:d src1:i src2:i len:12
140 rem.un: dest:d src1:i src2:i len:12
141 and: dest:i src1:i src2:i len:4
142 or: dest:i src1:i src2:i len:4
143 xor: dest:i src1:i src2:i len:4
144 shl: dest:i src1:i src2:i len:4
145 shr: dest:i src1:i src2:i len:4
146 shr.un: dest:i src1:i src2:i len:4
147 neg: dest:i src1:i len:4
148 not: dest:i src1:i len:4
149 conv.i1: dest:i src1:i len:4
150 conv.i2: dest:i src1:i len:4
151 conv.i4: dest:i src1:i len:4
153 conv.r4: dest:f src1:i len:4
154 conv.r8: dest:f src1:i len:4
155 conv.u4: dest:i src1:i len:
216 ckfinite: dest:f src1:f len:28
219 conv.u2: dest:i src1:i len:4
220 conv.u1: dest:i src1:i len:4
221 conv.i: dest:i src1:i len:4
226 mul.ovf: dest:i src1:i src2:i len:4
227 mul.ovf.un: dest:i src1:i src2:i len:4
230 # FIXME: May need some work
235 conv.u: dest:i src1:i len:4
247 cgt.un: dest:i len:12
249 clt.un: dest:i len:12
259 localloc: dest:i src1:i len:30
286 compare: src1:i src2:i len:4
287 compare_imm: src1:i len:12
288 fcompare: src1:f src2:f len:12
292 # FIXME: Mono-specifc opcodes (OP_) Need to clean these up
296 setret: dest:a src1:i len:4
297 setlret: dest:l src1:i src2:i len:8
298 setreg: dest:i src1:i len:4 clob:r
299 setregimm: dest:i len:8 clob:r
300 setfreg: dest:f src1:f len:4 clob:r
301 checkthis: src1:b len:4
302 voidcall: len:8 clob:c
303 voidcall_reg: src1:i len:8 clob:c
304 voidcall_membase: src1:b len:8 clob:c
305 fcall: dest:f len:8 clob:c
306 fcall_reg: dest:f src1:i len:8 clob:c
307 fcall_membase: dest:f src1:b len:8 clob:c
308 lcall: dest:l len:8 clob:c
309 lcall_reg: dest:l src1:i len:8 clob:c
310 lcall_membase: dest:l src1:b len:8 clob:c
312 vcall_reg: src1:i len:8 clob:c
313 vcall_membase: src1:b len:8 clob:c
314 call_reg: dest:i src1:i len:8 clob:c
315 call_membase: dest:i src1:b len:8 clob:c
319 r4const: dest:f len:8
320 r8const: dest:f len:8
325 store_membase_imm: dest:b len:12
326 store_membase_reg: dest:b src1:i len:8
327 storei1_membase_imm: dest:b len:12
328 storei1_membase_reg: dest:b src1:i len:8
329 storei2_membase_imm: dest:b len:12
330 storei2_membase_reg: dest:b src1:i len:8
331 storei4_membase_imm: dest:b len:12
332 storei4_membase_reg: dest:b src1:i len:8
333 storei8_membase_imm: dest:b
334 storei8_membase_reg: dest:b src1:i
335 storer4_membase_reg: dest:b src1:f len:8
336 storer8_membase_reg: dest:b src1:f len:8
337 load_membase: dest:i src1:b len:12
338 loadi1_membase: dest:i src1:b len:12
339 loadu1_membase: dest:i src1:b len:12
340 loadi2_membase: dest:i src1:b len:12
341 loadu2_membase: dest:i src1:b len:12
342 loadi4_membase: dest:i src1:b len:12
343 loadu4_membase: dest:i src1:b len:12
344 loadi8_membase: dest:i src1:b
345 loadr4_membase: dest:f src1:b len:8
346 loadr8_membase: dest:f src1:b len:12
347 loadu4_mem: dest:i len:8
348 move: dest:i src1:i len:4
349 add_imm: dest:i src1:i len:12
350 sub_imm: dest:i src1:i len:12
351 mul_imm: dest:i src1:i len:12
352 # there is no actual support for division or reminder by immediate
353 # we simulate them, though (but we need to change the burg rules
354 # to allocate a symbolic reg for src2)
355 div_imm: dest:a src1:i src2:i len:12
356 div_un_imm: dest:a src1:i src2:i len:12
357 rem_imm: dest:d src1:i src2:i len:16
358 rem_un_imm: dest:d src1:i src2:i len:16
359 and_imm: dest:i src1:i len:8
360 or_imm: dest:i src1:i len:8
361 xor_imm: dest:i src1:i len:8
362 shl_imm: dest:i src1:i len:8
363 shr_imm: dest:i src1:i len:8
364 shr_un_imm: dest:i src1:i len:8
366 cond_exc_ne_un: len:8
368 cond_exc_lt_un: len:8
370 cond_exc_gt_un: len:8
372 cond_exc_ge_un: len:8
374 cond_exc_le_un: len:8
405 long_conv_to_ovf_i: dest:i src1:i src2:i len:30
413 long_conv_to_ovf_i1_un:
414 long_conv_to_ovf_i2_un:
415 long_conv_to_ovf_i4_un:
416 long_conv_to_ovf_i8_un:
417 long_conv_to_ovf_u1_un:
418 long_conv_to_ovf_u2_un:
419 long_conv_to_ovf_u4_un:
420 long_conv_to_ovf_u8_un:
421 long_conv_to_ovf_i_un:
422 long_conv_to_ovf_u_un:
436 long_conv_to_r_un: dest:f src1:i src2:i len:37
470 float_neg: dest:f src1:f len:4
471 float_not: dest:f src1:f len:4
472 float_conv_to_i1: dest:i src1:f len:40
473 float_conv_to_i2: dest:i src1:f len:40
474 float_conv_to_i4: dest:i src1:f len:40
475 float_conv_to_i8: dest:l src1:f len:40
478 float_conv_to_u4: dest:i src1:f len:40
479 float_conv_to_u8: dest:l src1:f len:40
480 float_conv_to_u2: dest:i src1:f len:40
481 float_conv_to_u1: dest:i src1:f len:40
482 float_conv_to_i: dest:i src1:f len:40
491 float_conv_to_ovf_i1_un:
492 float_conv_to_ovf_i2_un:
493 float_conv_to_ovf_i4_un:
494 float_conv_to_ovf_i8_un:
495 float_conv_to_ovf_u1_un:
496 float_conv_to_ovf_u2_un:
497 float_conv_to_ovf_u4_un:
498 float_conv_to_ovf_u8_un:
499 float_conv_to_ovf_i_un:
500 float_conv_to_ovf_u_un:
501 float_conv_to_ovf_i1:
502 float_conv_to_ovf_u1:
503 float_conv_to_ovf_i2:
504 float_conv_to_ovf_u2:
505 float_conv_to_ovf_i4:
506 float_conv_to_ovf_u4:
507 float_conv_to_ovf_i8:
508 float_conv_to_ovf_u8:
509 float_ceq: dest:i src1:f src2:f len:12
510 float_cgt: dest:i src1:f src2:f len:12
511 float_cgt_un: dest:i src1:f src2:f len:12
512 float_clt: dest:i src1:f src2:f len:12
513 float_clt_un: dest:i src1:f src2:f len:12
514 float_conv_to_u: dest:i src1:f len:36
516 op_endfilter: src1:i len:12
517 aot_const: dest:i len:8
518 x86_test_null: src1:i len:4
519 x86_compare_membase_reg: src1:b src2:i len:8
520 x86_compare_membase_imm: src1:b len:8
521 x86_compare_reg_membase: src1:i src2:b len:8
522 x86_inc_reg: dest:i src1:i clob:1 len:1
523 x86_inc_membase: src1:b len:6
524 x86_dec_reg: dest:i src1:i clob:1 len:1
525 x86_dec_membase: src1:b len:6
526 x86_add_membase_imm: src1:b len:8
527 x86_sub_membase_imm: src1:b len:8
528 x86_push: src1:i len:1
530 x86_push_membase: src1:b len:6
531 x86_push_obj: src1:b len:30
532 x86_lea: dest:i src1:i src2:i len:7
533 x86_xchg: src1:i src2:i clob:x len:1
534 x86_fpop: src1:f len:2
535 x86_fp_load_i8: dest:f src1:b len:7
536 x86_fp_load_i4: dest:f src1:b len:7
537 adc: dest:i src1:i src2:i len:4
538 addcc: dest:i src1:i src2:i len:4
539 subcc: dest:i src1:i src2:i len:4
540 adc_imm: dest:i src1:i len:8
541 sbb: dest:i src1:i src2:i len:4
542 sbb_imm: dest:i src1:i len:8
544 ppc_subfic: dest:i src1:i len:4
545 ppc_subfze: dest:i src1:i len:4
546 op_bigmul: len:2 dest:l src1:a src2:i
547 op_bigmul_un: len:2 dest:l src1:a src2:i