libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
gen_arm_emitter.c
1 
9 #include "beemitter.h"
10 #include "gen_arm_emitter.h"
11 #include "arm_new_nodes.h"
12 #include "arm_emitter.h"
13 
14 static void emit_arm_AdC(ir_node const *const node)
15 {
16  arm_emitf(node, "adc %D0, %S0, %O");
17 }
18 
19 static void emit_arm_Add(ir_node const *const node)
20 {
21  arm_emitf(node, "add %D0, %S0, %O");
22 }
23 
24 static void emit_arm_AddS(ir_node const *const node)
25 {
26  arm_emitf(node, "adds %D0, %S0, %O");
27 }
28 
29 static void emit_arm_Adf(ir_node const *const node)
30 {
31  arm_emitf(node, "adf%MA %D0, %S0, %S1");
32 }
33 
34 static void emit_arm_And(ir_node const *const node)
35 {
36  arm_emitf(node, "and %D0, %S0, %O");
37 }
38 
39 static void emit_arm_Bic(ir_node const *const node)
40 {
41  arm_emitf(node, "bic %D0, %S0, %O");
42 }
43 
44 static void emit_arm_Bl(ir_node const *const node)
45 {
46  arm_emitf(node, "bl %I");
47 }
48 
49 static void emit_arm_Clz(ir_node const *const node)
50 {
51  arm_emitf(node, "clz %D0, %S0");
52 }
53 
54 static void emit_arm_Cmfe(ir_node const *const node)
55 {
56  arm_emitf(node, "cmfe %S0, %S1");
57 }
58 
59 static void emit_arm_Cmn(ir_node const *const node)
60 {
61  arm_emitf(node, "cmn %S0, %O");
62 }
63 
64 static void emit_arm_Cmp(ir_node const *const node)
65 {
66  arm_emitf(node, "cmp %S0, %O");
67 }
68 
69 static void emit_arm_Dvf(ir_node const *const node)
70 {
71  arm_emitf(node, "dvf%MA %D0, %S0, %S1");
72 }
73 
74 static void emit_arm_Eor(ir_node const *const node)
75 {
76  arm_emitf(node, "eor %D0, %S0, %O");
77 }
78 
79 static void emit_arm_FltX(ir_node const *const node)
80 {
81  arm_emitf(node, "flt%MA %D0, %S0");
82 }
83 
84 static void emit_arm_Ldf(ir_node const *const node)
85 {
86  arm_emitf(node, "ldf%MF %D0, [%S0, #%o]");
87 }
88 
89 static void emit_arm_Ldr(ir_node const *const node)
90 {
91  arm_emitf(node, "ldr%ML %D0, [%S0, #%o]");
92 }
93 
94 static void emit_arm_LinkLdrPC(ir_node const *const node)
95 {
96  arm_emitf(node, "mov lr, pc");
97  arm_emitf(node, "ldr pc, %O");
98 }
99 
100 static void emit_arm_LinkMovPC(ir_node const *const node)
101 {
102  arm_emitf(node, "mov lr, pc");
103  arm_emitf(node, "mov pc, %O");
104 }
105 
106 static void emit_arm_Mla(ir_node const *const node)
107 {
108  arm_emitf(node, "mla %D0, %S0, %S1, %S2");
109 }
110 
111 static void emit_arm_Mls(ir_node const *const node)
112 {
113  arm_emitf(node, "mls %D0, %S0, %S1, %S2");
114 }
115 
116 static void emit_arm_Mov(ir_node const *const node)
117 {
118  arm_emitf(node, "mov %D0, %O");
119 }
120 
121 static void emit_arm_Muf(ir_node const *const node)
122 {
123  arm_emitf(node, "muf%MA %D0, %S0, %S1");
124 }
125 
126 static void emit_arm_Mul(ir_node const *const node)
127 {
128  arm_emitf(node, "mul %D0, %S0, %S1");
129 }
130 
131 static void emit_arm_Mvf(ir_node const *const node)
132 {
133  arm_emitf(node, "mvf%MA %S0, %D0");
134 }
135 
136 static void emit_arm_Mvn(ir_node const *const node)
137 {
138  arm_emitf(node, "mvn %D0, %O");
139 }
140 
141 static void emit_arm_Or(ir_node const *const node)
142 {
143  arm_emitf(node, "orr %D0, %S0, %O");
144 }
145 
146 static void emit_arm_OrPl(ir_node const *const node)
147 {
148  arm_emitf(node, "orrpl %D0, %S2, %O");
149 }
150 
151 static void emit_arm_Pkhbt(ir_node const *const node)
152 {
153  arm_emitf(node, "pkhbt %D0, %S0, %O");
154 }
155 
156 static void emit_arm_Pkhtb(ir_node const *const node)
157 {
158  arm_emitf(node, "pkhtb %D0, %S0, %O");
159 }
160 
161 static void emit_arm_Return(ir_node const *const node)
162 {
163  arm_emitf(node, "bx lr");
164 }
165 
166 static void emit_arm_RsC(ir_node const *const node)
167 {
168  arm_emitf(node, "rsc %D0, %S0, %O");
169 }
170 
171 static void emit_arm_Rsb(ir_node const *const node)
172 {
173  arm_emitf(node, "rsb %D0, %S0, %O");
174 }
175 
176 static void emit_arm_RsbS(ir_node const *const node)
177 {
178  arm_emitf(node, "rsbs %D0, %S0, %O");
179 }
180 
181 static void emit_arm_SMulL(ir_node const *const node)
182 {
183  arm_emitf(node, "smull %D0, %D1, %S0, %S1");
184 }
185 
186 static void emit_arm_SbC(ir_node const *const node)
187 {
188  arm_emitf(node, "sbc %D0, %S0, %O");
189 }
190 
191 static void emit_arm_Stf(ir_node const *const node)
192 {
193  arm_emitf(node, "stf%MF %S1, [%S0, #%o]");
194 }
195 
196 static void emit_arm_Str(ir_node const *const node)
197 {
198  arm_emitf(node, "str%MS %S1, [%S0, #%o]");
199 }
200 
201 static void emit_arm_Sub(ir_node const *const node)
202 {
203  arm_emitf(node, "sub %D0, %S0, %O");
204 }
205 
206 static void emit_arm_SubS(ir_node const *const node)
207 {
208  arm_emitf(node, "subs %D0, %S0, %O");
209 }
210 
211 static void emit_arm_Suf(ir_node const *const node)
212 {
213  arm_emitf(node, "suf%MA %D0, %S0, %S1");
214 }
215 
216 static void emit_arm_Tst(ir_node const *const node)
217 {
218  arm_emitf(node, "tst %S0, %O");
219 }
220 
221 static void emit_arm_UMulL(ir_node const *const node)
222 {
223  arm_emitf(node, "umull %D0, %D1, %S0, %S1");
224 }
225 
226 
227 
232 void arm_register_spec_emitters(void)
233 {
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);
276 
277 }
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53