1 # mips cpu description file
2 # this file is read by genmdesc to pruduce a table with all the relevant
3 # information about the cpu instructions that may be used by the regsiter
4 # allocator, the scheduler 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.
8 # Specifiers are separated by white space.
9 # Here is a description of the specifiers valid for this file and their
12 # dest:register describes the destination register of an instruction
13 # src1:register describes the first source register of an instruction
14 # src2:register describes the second source register of an instruction
16 # register may have the following values:
18 # l integer register pair
19 # v v0 register (output from calls)
20 # V v0/v1 register pair (output from calls)
22 # b base register (used in address references)
23 # f floating point register (pair - always)
24 # g floating point register return pair (f0/f1)
26 # len:number describe the maximun length in bytes of the instruction
27 # number is a positive integer
29 # cost:number describe how many cycles are needed to complete the instruction (unused)
31 # clob:spec describe if the instruction clobbers registers or has special needs
33 # spec can be one of the following characters:
34 # c clobbers caller-save registers
35 # r 'reserves' the destination register until a later instruction unreserves it
36 # used mostly to set output registers in function calls
38 # flags:spec describe if the instruction uses or sets the flags (unused)
40 # spec can be one of the following chars:
43 # m uses and modifies the flags
45 # res:spec describe what units are used in the processor (unused)
47 # delay: describe delay slots (unused)
49 # the required specifiers are: len, clob (if registers are clobbered), the registers
50 # specifiers if the registers are actually used, flags (when scheduling is implemented).
52 # See the code in mini-x86.c for more details on how the specifiers are used.
59 call: dest:v clob:c len:20
63 callvirt: dest:v clob:c len:20
64 int_conv_to_r_un: dest:f src1:i len:32
66 rethrow: src1:i len:24
67 ckfinite: dest:f src1:f len:52
75 localloc: dest:i src1:i len:60
76 compare: src1:i src2:i len:20
77 compare_imm: src1:i len:20
78 fcompare: src1:f src2:f len:12
79 oparglist: src1:i len:12
80 setlret: src1:i src2:i len:12
81 checkthis: src1:b len:4
83 voidcall: len:20 clob:c
84 voidcall_reg: src1:i len:20 clob:c
85 voidcall_membase: src1:b len:20 clob:c
87 fcall: dest:g len:20 clob:c
88 fcall_reg: dest:g src1:i len:20 clob:c
89 fcall_membase: dest:g src1:b len:20 clob:c
91 lcall: dest:V len:28 clob:c
92 lcall_reg: dest:V src1:i len:28 clob:c
93 lcall_membase: dest:V src1:b len:28 clob:c
95 call_reg: dest:v src1:i len:20 clob:c
96 call_membase: dest:v src1:b len:20 clob:c
99 vcall_reg: src1:i len:20 clob:c
100 vcall_membase: src1:b len:20 clob:c
102 vcall2: len:16 clob:c
103 vcall2_reg: src1:i len:20 clob:c
104 vcall2_membase: src1:b len:20 clob:c
106 jump_table: dest:i len:8
108 iconst: dest:i len:12
109 i8const: dest:l len:24
110 r4const: dest:f len:20
111 r8const: dest:f len:28
113 store_membase_imm: dest:b len:20
114 store_membase_reg: dest:b src1:i len:16
115 storei1_membase_imm: dest:b len:20
116 storei1_membase_reg: dest:b src1:i len:16
117 storei2_membase_imm: dest:b len:20
118 storei2_membase_reg: dest:b src1:i len:16
119 storei4_membase_imm: dest:b len:20
120 storei4_membase_reg: dest:b src1:i len:16
121 storei8_membase_imm: dest:b
122 storei8_membase_reg: dest:b src1:i len:16
123 storer4_membase_reg: dest:b src1:f len:16
124 storer8_membase_reg: dest:b src1:f len:16
125 load_membase: dest:i src1:b len:16
126 loadi1_membase: dest:i src1:b len:16
127 loadu1_membase: dest:i src1:b len:16
128 loadi2_membase: dest:i src1:b len:16
129 loadu2_membase: dest:i src1:b len:16
130 loadi4_membase: dest:i src1:b len:16
131 loadu4_membase: dest:i src1:b len:16
132 loadi8_membase: dest:i src1:b len:16
133 loadr4_membase: dest:f src1:b len:16
134 loadr8_membase: dest:f src1:b len:16
135 loadu4_mem: dest:i len:8
136 move: dest:i src1:i len:4
137 fmove: dest:f src1:f len:8
138 add_imm: dest:i src1:i len:12
139 sub_imm: dest:i src1:i len:12
140 mul_imm: dest:i src1:i len:20
141 # there is no actual support for division or reminder by immediate
142 # we simulate them, though (but we need to change the burg rules
143 # to allocate a symbolic reg for src2)
144 div_imm: dest:i src1:i src2:i len:20
145 div_un_imm: dest:i src1:i src2:i len:12
146 rem_imm: dest:i src1:i src2:i len:28
147 rem_un_imm: dest:i src1:i src2:i len:16
148 and_imm: dest:i src1:i len:12
149 or_imm: dest:i src1:i len:12
150 xor_imm: dest:i src1:i len:12
151 shl_imm: dest:i src1:i len:8
152 shr_imm: dest:i src1:i len:8
153 shr_un_imm: dest:i src1:i len:8
159 not_null: src1:i len:0
162 int_add: dest:i src1:i src2:i len:4
163 int_sub: dest:i src1:i src2:i len:4
164 int_mul: dest:i src1:i src2:i len:4
165 int_div: dest:i src1:i src2:i len:76
166 int_div_un: dest:i src1:i src2:i len:40
167 int_rem: dest:i src1:i src2:i len:76
168 int_rem_un: dest:i src1:i src2:i len:76
169 int_and: dest:i src1:i src2:i len:4
170 int_or: dest:i src1:i src2:i len:4
171 int_xor: dest:i src1:i src2:i len:4
172 int_shl: dest:i src1:i src2:i len:4
173 int_shr: dest:i src1:i src2:i len:4
174 int_shr_un: dest:i src1:i src2:i len:4
175 int_neg: dest:i src1:i len:4
176 int_not: dest:i src1:i len:4
177 int_conv_to_i1: dest:i src1:i len:8
178 int_conv_to_i2: dest:i src1:i len:8
179 int_conv_to_i4: dest:i src1:i len:4
180 int_conv_to_r4: dest:f src1:i len:36
181 int_conv_to_r8: dest:f src1:i len:36
182 int_conv_to_u4: dest:i src1:i
183 int_conv_to_u2: dest:i src1:i len:8
184 int_conv_to_u1: dest:i src1:i len:4
195 int_add_ovf: dest:i src1:i src2:i len:16
196 int_add_ovf_un: dest:i src1:i src2:i len:16
197 int_mul_ovf: dest:i src1:i src2:i len:56
198 int_mul_ovf_un: dest:i src1:i src2:i len:56
199 int_sub_ovf: dest:i src1:i src2:i len:16
200 int_sub_ovf_un: dest:i src1:i src2:i len:16
202 int_adc: dest:i src1:i src2:i len:4
203 int_addcc: dest:i src1:i src2:i len:4
204 int_subcc: dest:i src1:i src2:i len:4
205 int_sbb: dest:i src1:i src2:i len:4
206 int_adc_imm: dest:i src1:i len:12
207 int_sbb_imm: dest:i src1:i len:12
209 int_add_imm: dest:i src1:i len:12
210 int_sub_imm: dest:i src1:i len:12
211 int_mul_imm: dest:i src1:i len:12
212 int_div_imm: dest:i src1:i len:20
213 int_div_un_imm: dest:i src1:i len:12
214 int_rem_imm: dest:i src1:i len:28
215 int_rem_un_imm: dest:i src1:i len:16
216 int_and_imm: dest:i src1:i len:12
217 int_or_imm: dest:i src1:i len:12
218 int_xor_imm: dest:i src1:i len:12
219 int_shl_imm: dest:i src1:i len:8
220 int_shr_imm: dest:i src1:i len:8
221 int_shr_un_imm: dest:i src1:i len:8
223 int_ceq: dest:i len:16
224 int_cgt: dest:i len:16
225 int_cgt_un: dest:i len:16
226 int_clt: dest:i len:16
227 int_clt_un: dest:i len:16
230 cond_exc_ne_un: len:32
232 cond_exc_lt_un: len:32
234 cond_exc_gt_un: len:32
236 cond_exc_ge_un: len:32
238 cond_exc_le_un: len:32
245 cond_exc_ine_un: len:32
247 cond_exc_ilt_un: len:32
249 cond_exc_igt_un: len:32
251 cond_exc_ige_un: len:32
253 cond_exc_ile_un: len:32
259 icompare: src1:i src2:i len:4
260 icompare_imm: src1:i len:12
263 long_add: dest:i src1:i src2:i len:4
264 long_sub: dest:i src1:i src2:i len:4
265 long_mul: dest:i src1:i src2:i len:8
266 long_mul_imm: dest:i src1:i len:4
267 long_div: dest:i src1:i src2:i len:40
268 long_div_un: dest:i src1:i src2:i len:16
269 long_rem: dest:i src1:i src2:i len:48
270 long_rem_un: dest:i src1:i src2:i len:24
271 long_and: dest:i src1:i src2:i len:4
272 long_or: dest:i src1:i src2:i len:4
273 long_xor: dest:i src1:i src2:i len:4
274 long_shl: dest:i src1:i src2:i len:4
275 long_shl_imm: dest:i src1:i len:4
276 long_shr: dest:i src1:i src2:i len:4
277 long_shr_un: dest:i src1:i src2:i len:4
278 long_shr_imm: dest:i src1:i len:4
279 long_shr_un_imm: dest:i src1:i len:4
280 long_neg: dest:i src1:i len:4
281 long_not: dest:i src1:i len:4
282 long_conv_to_i1: dest:i src1:l len:32
283 long_conv_to_i2: dest:i src1:l len:32
284 long_conv_to_i4: dest:i src1:l len:32
285 long_conv_to_r4: dest:f src1:l len:32
286 long_conv_to_r8: dest:f src1:l len:32
287 long_conv_to_u4: dest:i src1:l len:32
288 long_conv_to_u8: dest:l src1:l len:32
289 long_conv_to_u2: dest:i src1:l len:32
290 long_conv_to_u1: dest:i src1:l len:32
291 long_conv_to_i: dest:i src1:l len:32
292 long_conv_to_ovf_i: dest:i src1:i src2:i len:32
293 long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:32
294 zext_i4: dest:i src1:i len:16
295 sext_i4: dest:i src1:i len:16
307 long_add_ovf: dest:i src1:i src2:i len:16
308 long_add_ovf_un: dest:i src1:i src2:i len:16
309 long_mul_ovf: dest:i src1:i src2:i len:16
310 long_mul_ovf_un: dest:i src1:i src2:i len:16
311 long_sub_ovf: dest:i src1:i src2:i len:16
312 long_sub_ovf_un: dest:i src1:i src2:i len:16
314 long_ceq: dest:i len:12
315 long_cgt: dest:i len:12
316 long_cgt_un: dest:i len:12
317 long_clt: dest:i len:12
318 long_clt_un: dest:i len:12
320 long_add_imm: dest:i src1:i clob:1 len:4
321 long_sub_imm: dest:i src1:i clob:1 len:4
322 long_and_imm: dest:i src1:i clob:1 len:4
323 long_or_imm: dest:i src1:i clob:1 len:4
324 long_xor_imm: dest:i src1:i clob:1 len:4
326 lcompare: src1:i src2:i len:4
327 lcompare_imm: src1:i len:12
329 long_conv_to_r_un: dest:f src1:i src2:i len:37
342 float_add: dest:f src1:f src2:f len:4
343 float_sub: dest:f src1:f src2:f len:4
344 float_mul: dest:f src1:f src2:f len:4
345 float_div: dest:f src1:f src2:f len:4
346 float_div_un: dest:f src1:f src2:f len:4
347 float_rem: dest:f src1:f src2:f len:16
348 float_rem_un: dest:f src1:f src2:f len:16
349 float_neg: dest:f src1:f len:4
350 float_not: dest:f src1:f len:4
351 float_conv_to_i1: dest:i src1:f len:40
352 float_conv_to_i2: dest:i src1:f len:40
353 float_conv_to_i4: dest:i src1:f len:40
354 float_conv_to_i8: dest:l src1:f len:40
355 float_conv_to_r4: dest:f src1:f len:8
356 float_conv_to_u4: dest:i src1:f len:40
357 float_conv_to_u8: dest:l src1:f len:40
358 float_conv_to_u2: dest:i src1:f len:40
359 float_conv_to_u1: dest:i src1:f len:40
360 float_conv_to_i: dest:i src1:f len:40
361 float_ceq: dest:i src1:f src2:f len:20
362 float_cgt: dest:i src1:f src2:f len:20
363 float_cgt_un: dest:i src1:f src2:f len:20
364 float_clt: dest:i src1:f src2:f len:20
365 float_clt_un: dest:i src1:f src2:f len:20
366 float_conv_to_u: dest:i src1:f len:36
368 endfilter: src1:i len:16
369 aot_const: dest:i len:8
370 sqrt: dest:f src1:f len:4
371 adc: dest:i src1:i src2:i len:4
372 addcc: dest:i src1:i src2:i len:4
373 subcc: dest:i src1:i src2:i len:4
374 adc_imm: dest:i src1:i len:12
375 addcc_imm: dest:i src1:i len:12
376 subcc_imm: dest:i src1:i len:12
377 sbb: dest:i src1:i src2:i len:4
378 sbb_imm: dest:i src1:i len:12
380 #ppc_subfic: dest:i src1:i len:4
381 #ppc_subfze: dest:i src1:i len:4
382 bigmul: len:52 dest:l src1:i src2:i
383 bigmul_un: len:52 dest:l src1:i src2:i
384 tls_get: len:8 dest:i
385 mips_beq: src1:i src2:i len:24
386 mips_bgez: src1:i len:24
387 mips_bgtz: src1:i len:24
388 mips_blez: src1:i len:24
389 mips_bltz: src1:i len:24
390 mips_bne: src1:i src2:i len:24
391 mips_cvtsd: dest:f src1:f len:8
392 mips_fbeq: src1:f src2:f len:16
393 mips_fbge: src1:f src2:f len:16
394 mips_fbge_un: src1:f src2:f len:16
395 mips_fbgt: src1:f src2:f len:16
396 mips_fbgt_un: src1:f src2:f len:16
397 mips_fble: src1:f src2:f len:16
398 mips_fble_un: src1:f src2:f len:16
399 mips_fblt: src1:f src2:f len:16
400 mips_fblt_un: src1:f src2:f len:16
401 mips_fbne: src1:f src2:f len:16
402 mips_lwc1: dest:f src1:b len:16
403 mips_mtc1_s: dest:f src1:i len:8
404 mips_mtc1_s2: dest:f src1:i src2:i len:8
405 mips_mfc1_s: dest:i src1:f len:8
406 mips_mtc1_d: dest:f src1:i len:8
407 mips_mfc1_d: dest:i src1:f len:8
408 mips_slti: dest:i src1:i len:4
409 mips_slt: dest:i src1:i src2:i len:4
410 mips_sltiu: dest:i src1:i len:4
411 mips_sltu: dest:i src1:i src2:i len:4
412 mips_cond_exc_eq: src1:i src2:i len:44
413 mips_cond_exc_ge: src1:i src2:i len:44
414 mips_cond_exc_gt: src1:i src2:i len:44
415 mips_cond_exc_le: src1:i src2:i len:44
416 mips_cond_exc_lt: src1:i src2:i len:44
417 mips_cond_exc_ne_un: src1:i src2:i len:44
418 mips_cond_exc_ge_un: src1:i src2:i len:44
419 mips_cond_exc_gt_un: src1:i src2:i len:44
420 mips_cond_exc_le_un: src1:i src2:i len:44
421 mips_cond_exc_lt_un: src1:i src2:i len:44
422 mips_cond_exc_ov: src1:i src2:i len:44
423 mips_cond_exc_no: src1:i src2:i len:44
424 mips_cond_exc_c: src1:i src2:i len:44
425 mips_cond_exc_nc: src1:i src2:i len:44
426 mips_cond_exc_ieq: src1:i src2:i len:44
427 mips_cond_exc_ige: src1:i src2:i len:44
428 mips_cond_exc_igt: src1:i src2:i len:44
429 mips_cond_exc_ile: src1:i src2:i len:44
430 mips_cond_exc_ilt: src1:i src2:i len:44
431 mips_cond_exc_ine_un: src1:i src2:i len:44
432 mips_cond_exc_ige_un: src1:i src2:i len:44
433 mips_cond_exc_igt_un: src1:i src2:i len:44
434 mips_cond_exc_ile_un: src1:i src2:i len:44
435 mips_cond_exc_ilt_un: src1:i src2:i len:44
436 mips_cond_exc_iov: src1:i src2:i len:44
437 mips_cond_exc_ino: src1:i src2:i len:44
438 mips_cond_exc_ic: src1:i src2:i len:44
439 mips_cond_exc_inc: src1:i src2:i len:44