10 #include "gen_arm_emitter.h"
11 #include "arm_new_nodes.h"
12 #include "arm_emitter.h"
14 static void emit_arm_AdC(
ir_node const *
const node)
16 arm_emitf(node,
"adc %D0, %S0, %O");
19 static void emit_arm_Add(
ir_node const *
const node)
21 arm_emitf(node,
"add %D0, %S0, %O");
24 static void emit_arm_AddS(
ir_node const *
const node)
26 arm_emitf(node,
"adds %D0, %S0, %O");
29 static void emit_arm_Adf(
ir_node const *
const node)
31 arm_emitf(node,
"adf%MA %D0, %S0, %S1");
34 static void emit_arm_And(
ir_node const *
const node)
36 arm_emitf(node,
"and %D0, %S0, %O");
39 static void emit_arm_Bic(
ir_node const *
const node)
41 arm_emitf(node,
"bic %D0, %S0, %O");
44 static void emit_arm_Bl(
ir_node const *
const node)
46 arm_emitf(node,
"bl %I");
49 static void emit_arm_Clz(
ir_node const *
const node)
51 arm_emitf(node,
"clz %D0, %S0");
54 static void emit_arm_Cmfe(
ir_node const *
const node)
56 arm_emitf(node,
"cmfe %S0, %S1");
59 static void emit_arm_Cmn(
ir_node const *
const node)
61 arm_emitf(node,
"cmn %S0, %O");
64 static void emit_arm_Cmp(
ir_node const *
const node)
66 arm_emitf(node,
"cmp %S0, %O");
69 static void emit_arm_Dvf(
ir_node const *
const node)
71 arm_emitf(node,
"dvf%MA %D0, %S0, %S1");
74 static void emit_arm_Eor(
ir_node const *
const node)
76 arm_emitf(node,
"eor %D0, %S0, %O");
79 static void emit_arm_FltX(
ir_node const *
const node)
81 arm_emitf(node,
"flt%MA %D0, %S0");
84 static void emit_arm_Ldf(
ir_node const *
const node)
86 arm_emitf(node,
"ldf%MF %D0, [%S0, #%o]");
89 static void emit_arm_Ldr(
ir_node const *
const node)
91 arm_emitf(node,
"ldr%ML %D0, [%S0, #%o]");
94 static void emit_arm_LinkLdrPC(
ir_node const *
const node)
96 arm_emitf(node,
"mov lr, pc");
97 arm_emitf(node,
"ldr pc, %O");
100 static void emit_arm_LinkMovPC(
ir_node const *
const node)
102 arm_emitf(node,
"mov lr, pc");
103 arm_emitf(node,
"mov pc, %O");
106 static void emit_arm_Mla(
ir_node const *
const node)
108 arm_emitf(node,
"mla %D0, %S0, %S1, %S2");
111 static void emit_arm_Mls(
ir_node const *
const node)
113 arm_emitf(node,
"mls %D0, %S0, %S1, %S2");
116 static void emit_arm_Mov(
ir_node const *
const node)
118 arm_emitf(node,
"mov %D0, %O");
121 static void emit_arm_Muf(
ir_node const *
const node)
123 arm_emitf(node,
"muf%MA %D0, %S0, %S1");
126 static void emit_arm_Mul(
ir_node const *
const node)
128 arm_emitf(node,
"mul %D0, %S0, %S1");
131 static void emit_arm_Mvf(
ir_node const *
const node)
133 arm_emitf(node,
"mvf%MA %S0, %D0");
136 static void emit_arm_Mvn(
ir_node const *
const node)
138 arm_emitf(node,
"mvn %D0, %O");
141 static void emit_arm_Or(
ir_node const *
const node)
143 arm_emitf(node,
"orr %D0, %S0, %O");
146 static void emit_arm_OrPl(
ir_node const *
const node)
148 arm_emitf(node,
"orrpl %D0, %S2, %O");
151 static void emit_arm_Pkhbt(
ir_node const *
const node)
153 arm_emitf(node,
"pkhbt %D0, %S0, %O");
156 static void emit_arm_Pkhtb(
ir_node const *
const node)
158 arm_emitf(node,
"pkhtb %D0, %S0, %O");
161 static void emit_arm_Return(
ir_node const *
const node)
163 arm_emitf(node,
"bx lr");
166 static void emit_arm_RsC(
ir_node const *
const node)
168 arm_emitf(node,
"rsc %D0, %S0, %O");
171 static void emit_arm_Rsb(
ir_node const *
const node)
173 arm_emitf(node,
"rsb %D0, %S0, %O");
176 static void emit_arm_RsbS(
ir_node const *
const node)
178 arm_emitf(node,
"rsbs %D0, %S0, %O");
181 static void emit_arm_SMulL(
ir_node const *
const node)
183 arm_emitf(node,
"smull %D0, %D1, %S0, %S1");
186 static void emit_arm_SbC(
ir_node const *
const node)
188 arm_emitf(node,
"sbc %D0, %S0, %O");
191 static void emit_arm_Stf(
ir_node const *
const node)
193 arm_emitf(node,
"stf%MF %S1, [%S0, #%o]");
196 static void emit_arm_Str(
ir_node const *
const node)
198 arm_emitf(node,
"str%MS %S1, [%S0, #%o]");
201 static void emit_arm_Sub(
ir_node const *
const node)
203 arm_emitf(node,
"sub %D0, %S0, %O");
206 static void emit_arm_SubS(
ir_node const *
const node)
208 arm_emitf(node,
"subs %D0, %S0, %O");
211 static void emit_arm_Suf(
ir_node const *
const node)
213 arm_emitf(node,
"suf%MA %D0, %S0, %S1");
216 static void emit_arm_Tst(
ir_node const *
const node)
218 arm_emitf(node,
"tst %S0, %O");
221 static void emit_arm_UMulL(
ir_node const *
const node)
223 arm_emitf(node,
"umull %D0, %D1, %S0, %S1");
232 void arm_register_spec_emitters(
void)
234 be_set_emitter(op_arm_AdC, emit_arm_AdC);
235 be_set_emitter(op_arm_Add, emit_arm_Add);
236 be_set_emitter(op_arm_AddS, emit_arm_AddS);
237 be_set_emitter(op_arm_Adf, emit_arm_Adf);
238 be_set_emitter(op_arm_And, emit_arm_And);
239 be_set_emitter(op_arm_Bic, emit_arm_Bic);
240 be_set_emitter(op_arm_Bl, emit_arm_Bl);
241 be_set_emitter(op_arm_Clz, emit_arm_Clz);
242 be_set_emitter(op_arm_Cmfe, emit_arm_Cmfe);
243 be_set_emitter(op_arm_Cmn, emit_arm_Cmn);
244 be_set_emitter(op_arm_Cmp, emit_arm_Cmp);
245 be_set_emitter(op_arm_Dvf, emit_arm_Dvf);
246 be_set_emitter(op_arm_Eor, emit_arm_Eor);
247 be_set_emitter(op_arm_FltX, emit_arm_FltX);
248 be_set_emitter(op_arm_Ldf, emit_arm_Ldf);
249 be_set_emitter(op_arm_Ldr, emit_arm_Ldr);
250 be_set_emitter(op_arm_LinkLdrPC, emit_arm_LinkLdrPC);
251 be_set_emitter(op_arm_LinkMovPC, emit_arm_LinkMovPC);
252 be_set_emitter(op_arm_Mla, emit_arm_Mla);
253 be_set_emitter(op_arm_Mls, emit_arm_Mls);
254 be_set_emitter(op_arm_Mov, emit_arm_Mov);
255 be_set_emitter(op_arm_Muf, emit_arm_Muf);
256 be_set_emitter(op_arm_Mul, emit_arm_Mul);
257 be_set_emitter(op_arm_Mvf, emit_arm_Mvf);
258 be_set_emitter(op_arm_Mvn, emit_arm_Mvn);
259 be_set_emitter(op_arm_Or, emit_arm_Or);
260 be_set_emitter(op_arm_OrPl, emit_arm_OrPl);
261 be_set_emitter(op_arm_Pkhbt, emit_arm_Pkhbt);
262 be_set_emitter(op_arm_Pkhtb, emit_arm_Pkhtb);
263 be_set_emitter(op_arm_Return, emit_arm_Return);
264 be_set_emitter(op_arm_RsC, emit_arm_RsC);
265 be_set_emitter(op_arm_Rsb, emit_arm_Rsb);
266 be_set_emitter(op_arm_RsbS, emit_arm_RsbS);
267 be_set_emitter(op_arm_SMulL, emit_arm_SMulL);
268 be_set_emitter(op_arm_SbC, emit_arm_SbC);
269 be_set_emitter(op_arm_Stf, emit_arm_Stf);
270 be_set_emitter(op_arm_Str, emit_arm_Str);
271 be_set_emitter(op_arm_Sub, emit_arm_Sub);
272 be_set_emitter(op_arm_SubS, emit_arm_SubS);
273 be_set_emitter(op_arm_Suf, emit_arm_Suf);
274 be_set_emitter(op_arm_Tst, emit_arm_Tst);
275 be_set_emitter(op_arm_UMulL, emit_arm_UMulL);
struct ir_node ir_node
Procedure Graph Node.