1 # powerpc 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
20 # len:number describe the maximun length in bytes of the instruction
21 # number is a positive integer
23 # cost:number describe how many cycles are needed to complete the instruction (unused)
25 # clob:spec describe if the instruction clobbers registers or has special needs
27 # spec can be one of the following characters:
28 # c clobbers caller-save registers
29 # r 'reserves' the destination register until a later instruction unreserves it
30 # used mostly to set output registers in function calls
32 # flags:spec describe if the instruction uses or sets the flags (unused)
34 # spec can be one of the following chars:
37 # m uses and modifies the flags
39 # res:spec describe what units are used in the processor (unused)
41 # delay: describe delay slots (unused)
43 # the required specifiers are: len, clob (if registers are clobbered), the registers
44 # specifiers if the registers are actually used, flags (when scheduling is implemented).
46 # See the code in mini-x86.c for more details on how the specifiers are used.
53 call: dest:a clob:c len:16
56 rethrow: src1:i len:20
57 ckfinite: dest:f src1:f
58 ppc_check_finite: src1:i len:16
59 add_ovf_carry: dest:i src1:i src2:i len:16
60 sub_ovf_carry: dest:i src1:i src2:i len:16
61 add_ovf_un_carry: dest:i src1:i src2:i len:16
62 sub_ovf_un_carry: dest:i src1:i src2:i len:16
70 localloc: dest:i src1:i len:60
71 compare: src1:i src2:i len:4
72 compare_imm: src1:i len:12
73 fcompare: src1:f src2:f len:12
74 oparglist: src1:i len:12
75 setlret: src1:i src2:i len:12
76 checkthis: src1:b len:4
77 voidcall: len:16 clob:c
78 voidcall_reg: src1:i len:8 clob:c
79 voidcall_membase: src1:b len:12 clob:c
80 fcall: dest:g len:16 clob:c
81 fcall_reg: dest:g src1:i len:8 clob:c
82 fcall_membase: dest:g src1:b len:12 clob:c
83 lcall: dest:l len:16 clob:c
84 lcall_reg: dest:l src1:i len:8 clob:c
85 lcall_membase: dest:l src1:b len:12 clob:c
87 vcall_reg: src1:i len:8 clob:c
88 vcall_membase: src1:b len:12 clob:c
89 call_reg: dest:a src1:i len:8 clob:c
90 call_membase: dest:a src1:b len:12 clob:c
92 r4const: dest:f len:12
93 r8const: dest:f len:12
95 store_membase_reg: dest:b src1:i len:12
96 storei1_membase_reg: dest:b src1:i len:12
97 storei2_membase_reg: dest:b src1:i len:12
98 storei4_membase_reg: dest:b src1:i len:12
99 storer4_membase_reg: dest:b src1:f len:16
100 storer8_membase_reg: dest:b src1:f len:12
101 load_membase: dest:i src1:b len:12
102 loadi1_membase: dest:i src1:b len:16
103 loadu1_membase: dest:i src1:b len:12
104 loadi2_membase: dest:i src1:b len:12
105 loadu2_membase: dest:i src1:b len:12
106 loadi4_membase: dest:i src1:b len:12
107 loadu4_membase: dest:i src1:b len:12
108 loadr4_membase: dest:f src1:b len:12
109 loadr8_membase: dest:f src1:b len:12
110 load_memindex: dest:i src1:b src2:i len:4
111 loadi1_memindex: dest:i src1:b src2:i len:8
112 loadu1_memindex: dest:i src1:b src2:i len:4
113 loadi2_memindex: dest:i src1:b src2:i len:4
114 loadu2_memindex: dest:i src1:b src2:i len:4
115 loadi4_memindex: dest:i src1:b src2:i len:4
116 loadu4_memindex: dest:i src1:b src2:i len:4
117 loadr4_memindex: dest:f src1:b src2:i len:4
118 loadr8_memindex: dest:f src1:b src2:i len:4
119 store_memindex: dest:b src1:i src2:i len:4
120 storei1_memindex: dest:b src1:i src2:i len:4
121 storei2_memindex: dest:b src1:i src2:i len:4
122 storei4_memindex: dest:b src1:i src2:i len:4
123 storer4_memindex: dest:b src1:i src2:i len:8
124 storer8_memindex: dest:b src1:i src2:i len:4
125 loadu4_mem: dest:i len:8
126 move: dest:i src1:i len:4
127 fmove: dest:f src1:f len:4
128 add_imm: dest:i src1:i len:4
129 sub_imm: dest:i src1:i len:4
130 mul_imm: dest:i src1:i len:4
131 # there is no actual support for division or reminder by immediate
132 # we simulate them, though (but we need to change the burg rules
133 # to allocate a symbolic reg for src2)
134 div_imm: dest:i src1:i src2:i len:20
135 div_un_imm: dest:i src1:i src2:i len:12
136 rem_imm: dest:i src1:i src2:i len:28
137 rem_un_imm: dest:i src1:i src2:i len:16
138 and_imm: dest:i src1:i len:4
139 or_imm: dest:i src1:i len:4
140 xor_imm: dest:i src1:i len:4
141 shl_imm: dest:i src1:i len:4
142 shr_imm: dest:i src1:i len:4
143 shr_un_imm: dest:i src1:i len:4
145 cond_exc_ne_un: len:8
147 cond_exc_lt_un: len:8
149 cond_exc_gt_un: len:8
151 cond_exc_ge_un: len:8
153 cond_exc_le_un: len:8
158 long_conv_to_ovf_i: dest:i src1:i src2:i len:32
160 long_conv_to_r_un: dest:f src1:i src2:i len:37
171 float_add: dest:f src1:f src2:f len:4
172 float_sub: dest:f src1:f src2:f len:4
173 float_mul: dest:f src1:f src2:f len:4
174 float_div: dest:f src1:f src2:f len:4
175 float_div_un: dest:f src1:f src2:f len:4
176 float_rem: dest:f src1:f src2:f len:16
177 float_rem_un: dest:f src1:f src2:f len:16
178 float_neg: dest:f src1:f len:4
179 float_not: dest:f src1:f len:4
180 float_conv_to_i1: dest:i src1:f len:40
181 float_conv_to_i2: dest:i src1:f len:40
182 float_conv_to_i4: dest:i src1:f len:40
183 float_conv_to_i8: dest:l src1:f len:40
184 float_conv_to_r4: dest:f src1:f len:4
185 float_conv_to_u4: dest:i src1:f len:40
186 float_conv_to_u8: dest:l src1:f len:40
187 float_conv_to_u2: dest:i src1:f len:40
188 float_conv_to_u1: dest:i src1:f len:40
189 float_conv_to_i: dest:i src1:f len:40
190 float_ceq: dest:i src1:f src2:f len:16
191 float_cgt: dest:i src1:f src2:f len:16
192 float_cgt_un: dest:i src1:f src2:f len:20
193 float_clt: dest:i src1:f src2:f len:16
194 float_clt_un: dest:i src1:f src2:f len:20
195 float_conv_to_u: dest:i src1:f len:36
197 endfilter: src1:i len:32
198 aot_const: dest:i len:8
199 sqrt: dest:f src1:f len:4
200 adc: dest:i src1:i src2:i len:4
201 addcc: dest:i src1:i src2:i len:4
202 subcc: dest:i src1:i src2:i len:4
203 addcc_imm: dest:i src1:i len:4
204 sbb: dest:i src1:i src2:i len:4
206 ppc_subfic: dest:i src1:i len:4
207 ppc_subfze: dest:i src1:i len:4
208 bigmul: len:12 dest:l src1:i src2:i
209 bigmul_un: len:12 dest:l src1:i src2:i
210 tls_get: len:8 dest:i
216 not_null: src1:i len:0
219 int_add: dest:i src1:i src2:i len:4
220 int_sub: dest:i src1:i src2:i len:4
221 int_mul: dest:i src1:i src2:i len:4
222 int_div: dest:i src1:i src2:i len:40
223 int_div_un: dest:i src1:i src2:i len:16
224 int_rem: dest:i src1:i src2:i len:48
225 int_rem_un: dest:i src1:i src2:i len:24
226 int_and: dest:i src1:i src2:i len:4
227 int_or: dest:i src1:i src2:i len:4
228 int_xor: dest:i src1:i src2:i len:4
229 int_shl: dest:i src1:i src2:i len:4
230 int_shr: dest:i src1:i src2:i len:4
231 int_shr_un: dest:i src1:i src2:i len:4
232 int_neg: dest:i src1:i len:4
233 int_not: dest:i src1:i len:4
234 int_conv_to_i1: dest:i src1:i len:8
235 int_conv_to_i2: dest:i src1:i len:8
236 int_conv_to_i4: dest:i src1:i len:4
237 int_conv_to_r4: dest:f src1:i len:36
238 int_conv_to_r8: dest:f src1:i len:36
239 int_conv_to_u4: dest:i src1:i
240 int_conv_to_u2: dest:i src1:i len:8
241 int_conv_to_u1: dest:i src1:i len:4
252 int_add_ovf: dest:i src1:i src2:i len:16
253 int_add_ovf_un: dest:i src1:i src2:i len:16
254 int_mul_ovf: dest:i src1:i src2:i len:16
255 int_mul_ovf_un: dest:i src1:i src2:i len:16
256 int_sub_ovf: dest:i src1:i src2:i len:16
257 int_sub_ovf_un: dest:i src1:i src2:i len:16
259 int_adc: dest:i src1:i src2:i len:4
260 int_addcc: dest:i src1:i src2:i len:4
261 int_subcc: dest:i src1:i src2:i len:4
262 int_sbb: dest:i src1:i src2:i len:4
263 int_adc_imm: dest:i src1:i len:12
264 int_sbb_imm: dest:i src1:i len:12
266 int_add_imm: dest:i src1:i len:12
267 int_sub_imm: dest:i src1:i len:12
268 int_mul_imm: dest:i src1:i len:12
269 int_div_imm: dest:i src1:i len:20
270 int_div_un_imm: dest:i src1:i len:12
271 int_rem_imm: dest:i src1:i len:28
272 int_rem_un_imm: dest:i src1:i len:16
273 int_and_imm: dest:i src1:i len:12
274 int_or_imm: dest:i src1:i len:12
275 int_xor_imm: dest:i src1:i len:12
276 int_shl_imm: dest:i src1:i len:8
277 int_shr_imm: dest:i src1:i len:8
278 int_shr_un_imm: dest:i src1:i len:8
280 int_ceq: dest:i len:12
281 int_cgt: dest:i len:12
282 int_cgt_un: dest:i len:12
283 int_clt: dest:i len:12
284 int_clt_un: dest:i len:12
287 cond_exc_ine_un: len:8
289 cond_exc_ilt_un: len:8
291 cond_exc_igt_un: len:8
293 cond_exc_ige_un: len:8
295 cond_exc_ile_un: len:8
301 icompare: src1:i src2:i len:4
302 icompare_imm: src1:i len:12
304 long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:32
306 vcall2: len:20 clob:c
307 vcall2_reg: src1:i len:8 clob:c
308 vcall2_membase: src1:b len:12 clob:c
310 jump_table: dest:i len:8