1#include "gen_sparc_regalloc_if.h"
2#include "irverify_t.h"
3#include "fourcc.h"
4
5
6ir_op *op_sparc_SubCCZero = NULL;
7ir_op *op_sparc_Sra = NULL;
8ir_op *op_sparc_Ld = NULL;
9ir_op *op_sparc_fitof = NULL;
10ir_op *op_sparc_fadd = NULL;
11ir_op *op_sparc_Start = NULL;
12ir_op *op_sparc_RestoreZero = NULL;
13ir_op *op_sparc_SetHi = NULL;
14ir_op *op_sparc_Xor = NULL;
15ir_op *op_sparc_Or = NULL;
16ir_op *op_sparc_Restore = NULL;
17ir_op *op_sparc_SubX_t = NULL;
18ir_op *op_sparc_UMulh = NULL;
19ir_op *op_sparc_Ba = NULL;
20ir_op *op_sparc_Cmp = NULL;
21ir_op *op_sparc_fftof = NULL;
22ir_op *op_sparc_XNorCCZero = NULL;
23ir_op *op_sparc_Call = NULL;
24ir_op *op_sparc_AddX = NULL;
25ir_op *op_sparc_SubSP = NULL;
26ir_op *op_sparc_Add = NULL;
27ir_op *op_sparc_SubCC = NULL;
28ir_op *op_sparc_Ldf = NULL;
29ir_op *op_sparc_fdiv = NULL;
30ir_op *op_sparc_AndN = NULL;
31ir_op *op_sparc_fftoi = NULL;
32ir_op *op_sparc_XorCCZero = NULL;
33ir_op *op_sparc_St = NULL;
34ir_op *op_sparc_MulCCZero = NULL;
35ir_op *op_sparc_Save = NULL;
36ir_op *op_sparc_fbfcc = NULL;
37ir_op *op_sparc_Sub = NULL;
38ir_op *op_sparc_Mul = NULL;
39ir_op *op_sparc_SubCC_t = NULL;
40ir_op *op_sparc_Stf = NULL;
41ir_op *op_sparc_SDiv = NULL;
42ir_op *op_sparc_AddX_t = NULL;
43ir_op *op_sparc_fabs = NULL;
44ir_op *op_sparc_AddCC = NULL;
45ir_op *op_sparc_Bicc = NULL;
46ir_op *op_sparc_OrN = NULL;
47ir_op *op_sparc_SubX = NULL;
48ir_op *op_sparc_fcmp = NULL;
49ir_op *op_sparc_OrCCZero = NULL;
50ir_op *op_sparc_AddSP = NULL;
51ir_op *op_sparc_SMulh = NULL;
52ir_op *op_sparc_AddCC_t = NULL;
53ir_op *op_sparc_Return = NULL;
54ir_op *op_sparc_XNor = NULL;
55ir_op *op_sparc_AndNCCZero = NULL;
56ir_op *op_sparc_AndCCZero = NULL;
57ir_op *op_sparc_FrameAddr = NULL;
58ir_op *op_sparc_OrNCCZero = NULL;
59ir_op *op_sparc_And = NULL;
60ir_op *op_sparc_fmul = NULL;
61ir_op *op_sparc_AddCCZero = NULL;
62ir_op *op_sparc_UDiv = NULL;
63ir_op *op_sparc_Sll = NULL;
64ir_op *op_sparc_SwitchJmp = NULL;
65ir_op *op_sparc_Srl = NULL;
66ir_op *op_sparc_fneg = NULL;
67ir_op *op_sparc_fsub = NULL;
68
69ir_op *get_op_sparc_SubCCZero(void)         { return op_sparc_SubCCZero; }
70int    is_sparc_SubCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubCCZero; }
71
72ir_op *get_op_sparc_Sra(void)         { return op_sparc_Sra; }
73int    is_sparc_Sra(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Sra; }
74
75ir_op *get_op_sparc_Ld(void)         { return op_sparc_Ld; }
76int    is_sparc_Ld(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Ld; }
77
78ir_op *get_op_sparc_fitof(void)         { return op_sparc_fitof; }
79int    is_sparc_fitof(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fitof; }
80
81ir_op *get_op_sparc_fadd(void)         { return op_sparc_fadd; }
82int    is_sparc_fadd(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fadd; }
83
84ir_op *get_op_sparc_Start(void)         { return op_sparc_Start; }
85int    is_sparc_Start(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Start; }
86
87ir_op *get_op_sparc_RestoreZero(void)         { return op_sparc_RestoreZero; }
88int    is_sparc_RestoreZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_RestoreZero; }
89
90ir_op *get_op_sparc_SetHi(void)         { return op_sparc_SetHi; }
91int    is_sparc_SetHi(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SetHi; }
92
93ir_op *get_op_sparc_Xor(void)         { return op_sparc_Xor; }
94int    is_sparc_Xor(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Xor; }
95
96ir_op *get_op_sparc_Or(void)         { return op_sparc_Or; }
97int    is_sparc_Or(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Or; }
98
99ir_op *get_op_sparc_Restore(void)         { return op_sparc_Restore; }
100int    is_sparc_Restore(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Restore; }
101
102ir_op *get_op_sparc_SubX_t(void)         { return op_sparc_SubX_t; }
103int    is_sparc_SubX_t(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubX_t; }
104
105ir_op *get_op_sparc_UMulh(void)         { return op_sparc_UMulh; }
106int    is_sparc_UMulh(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_UMulh; }
107
108ir_op *get_op_sparc_Ba(void)         { return op_sparc_Ba; }
109int    is_sparc_Ba(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Ba; }
110
111ir_op *get_op_sparc_Cmp(void)         { return op_sparc_Cmp; }
112int    is_sparc_Cmp(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Cmp; }
113
114ir_op *get_op_sparc_fftof(void)         { return op_sparc_fftof; }
115int    is_sparc_fftof(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fftof; }
116
117ir_op *get_op_sparc_XNorCCZero(void)         { return op_sparc_XNorCCZero; }
118int    is_sparc_XNorCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_XNorCCZero; }
119
120ir_op *get_op_sparc_Call(void)         { return op_sparc_Call; }
121int    is_sparc_Call(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Call; }
122
123ir_op *get_op_sparc_AddX(void)         { return op_sparc_AddX; }
124int    is_sparc_AddX(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddX; }
125
126ir_op *get_op_sparc_SubSP(void)         { return op_sparc_SubSP; }
127int    is_sparc_SubSP(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubSP; }
128
129ir_op *get_op_sparc_Add(void)         { return op_sparc_Add; }
130int    is_sparc_Add(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Add; }
131
132ir_op *get_op_sparc_SubCC(void)         { return op_sparc_SubCC; }
133int    is_sparc_SubCC(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubCC; }
134
135ir_op *get_op_sparc_Ldf(void)         { return op_sparc_Ldf; }
136int    is_sparc_Ldf(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Ldf; }
137
138ir_op *get_op_sparc_fdiv(void)         { return op_sparc_fdiv; }
139int    is_sparc_fdiv(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fdiv; }
140
141ir_op *get_op_sparc_AndN(void)         { return op_sparc_AndN; }
142int    is_sparc_AndN(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AndN; }
143
144ir_op *get_op_sparc_fftoi(void)         { return op_sparc_fftoi; }
145int    is_sparc_fftoi(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fftoi; }
146
147ir_op *get_op_sparc_XorCCZero(void)         { return op_sparc_XorCCZero; }
148int    is_sparc_XorCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_XorCCZero; }
149
150ir_op *get_op_sparc_St(void)         { return op_sparc_St; }
151int    is_sparc_St(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_St; }
152
153ir_op *get_op_sparc_MulCCZero(void)         { return op_sparc_MulCCZero; }
154int    is_sparc_MulCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_MulCCZero; }
155
156ir_op *get_op_sparc_Save(void)         { return op_sparc_Save; }
157int    is_sparc_Save(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Save; }
158
159ir_op *get_op_sparc_fbfcc(void)         { return op_sparc_fbfcc; }
160int    is_sparc_fbfcc(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fbfcc; }
161
162ir_op *get_op_sparc_Sub(void)         { return op_sparc_Sub; }
163int    is_sparc_Sub(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Sub; }
164
165ir_op *get_op_sparc_Mul(void)         { return op_sparc_Mul; }
166int    is_sparc_Mul(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Mul; }
167
168ir_op *get_op_sparc_SubCC_t(void)         { return op_sparc_SubCC_t; }
169int    is_sparc_SubCC_t(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubCC_t; }
170
171ir_op *get_op_sparc_Stf(void)         { return op_sparc_Stf; }
172int    is_sparc_Stf(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Stf; }
173
174ir_op *get_op_sparc_SDiv(void)         { return op_sparc_SDiv; }
175int    is_sparc_SDiv(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SDiv; }
176
177ir_op *get_op_sparc_AddX_t(void)         { return op_sparc_AddX_t; }
178int    is_sparc_AddX_t(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddX_t; }
179
180ir_op *get_op_sparc_fabs(void)         { return op_sparc_fabs; }
181int    is_sparc_fabs(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fabs; }
182
183ir_op *get_op_sparc_AddCC(void)         { return op_sparc_AddCC; }
184int    is_sparc_AddCC(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddCC; }
185
186ir_op *get_op_sparc_Bicc(void)         { return op_sparc_Bicc; }
187int    is_sparc_Bicc(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Bicc; }
188
189ir_op *get_op_sparc_OrN(void)         { return op_sparc_OrN; }
190int    is_sparc_OrN(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_OrN; }
191
192ir_op *get_op_sparc_SubX(void)         { return op_sparc_SubX; }
193int    is_sparc_SubX(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SubX; }
194
195ir_op *get_op_sparc_fcmp(void)         { return op_sparc_fcmp; }
196int    is_sparc_fcmp(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fcmp; }
197
198ir_op *get_op_sparc_OrCCZero(void)         { return op_sparc_OrCCZero; }
199int    is_sparc_OrCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_OrCCZero; }
200
201ir_op *get_op_sparc_AddSP(void)         { return op_sparc_AddSP; }
202int    is_sparc_AddSP(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddSP; }
203
204ir_op *get_op_sparc_SMulh(void)         { return op_sparc_SMulh; }
205int    is_sparc_SMulh(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SMulh; }
206
207ir_op *get_op_sparc_AddCC_t(void)         { return op_sparc_AddCC_t; }
208int    is_sparc_AddCC_t(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddCC_t; }
209
210ir_op *get_op_sparc_Return(void)         { return op_sparc_Return; }
211int    is_sparc_Return(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Return; }
212
213ir_op *get_op_sparc_XNor(void)         { return op_sparc_XNor; }
214int    is_sparc_XNor(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_XNor; }
215
216ir_op *get_op_sparc_AndNCCZero(void)         { return op_sparc_AndNCCZero; }
217int    is_sparc_AndNCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AndNCCZero; }
218
219ir_op *get_op_sparc_AndCCZero(void)         { return op_sparc_AndCCZero; }
220int    is_sparc_AndCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AndCCZero; }
221
222ir_op *get_op_sparc_FrameAddr(void)         { return op_sparc_FrameAddr; }
223int    is_sparc_FrameAddr(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_FrameAddr; }
224
225ir_op *get_op_sparc_OrNCCZero(void)         { return op_sparc_OrNCCZero; }
226int    is_sparc_OrNCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_OrNCCZero; }
227
228ir_op *get_op_sparc_And(void)         { return op_sparc_And; }
229int    is_sparc_And(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_And; }
230
231ir_op *get_op_sparc_fmul(void)         { return op_sparc_fmul; }
232int    is_sparc_fmul(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fmul; }
233
234ir_op *get_op_sparc_AddCCZero(void)         { return op_sparc_AddCCZero; }
235int    is_sparc_AddCCZero(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_AddCCZero; }
236
237ir_op *get_op_sparc_UDiv(void)         { return op_sparc_UDiv; }
238int    is_sparc_UDiv(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_UDiv; }
239
240ir_op *get_op_sparc_Sll(void)         { return op_sparc_Sll; }
241int    is_sparc_Sll(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Sll; }
242
243ir_op *get_op_sparc_SwitchJmp(void)         { return op_sparc_SwitchJmp; }
244int    is_sparc_SwitchJmp(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_SwitchJmp; }
245
246ir_op *get_op_sparc_Srl(void)         { return op_sparc_Srl; }
247int    is_sparc_Srl(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_Srl; }
248
249ir_op *get_op_sparc_fneg(void)         { return op_sparc_fneg; }
250int    is_sparc_fneg(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fneg; }
251
252ir_op *get_op_sparc_fsub(void)         { return op_sparc_fsub; }
253int    is_sparc_fsub(const ir_node *n) { return get_sparc_irn_opcode(n) == iro_sparc_fsub; }
254
255
256
257static int sparc_opcode_start = -1;
258static int sparc_opcode_end   = -1;
259
260
261/** A tag for the sparc opcodes. Note that the address is used as a tag value, NOT the FOURCC code. */
262#define sparc_op_tag FOURCC('S', 'P', 'A', 'R')
263
264/** Return the opcode number of the first sparc opcode. */
265int get_sparc_opcode_first(void) {
266	return sparc_opcode_start;
267}
268
269/** Return the opcode number of the last sparc opcode + 1. */
270int get_sparc_opcode_last(void) {
271	return sparc_opcode_end;
272}
273
274/** Return 1 if the given opcode is a sparc machine op, 0 otherwise */
275int is_sparc_op(const ir_op *op) {
276	return get_op_tag(op) == sparc_op_tag;
277}
278
279/** Return 1 if the given node is a sparc machine node, 0 otherwise */
280int is_sparc_irn(const ir_node *node) {
281	return is_sparc_op(get_irn_op(node));
282}
283
284int get_sparc_irn_opcode(const ir_node *node) {
285	if (is_sparc_irn(node))
286		return get_irn_opcode(node) - sparc_opcode_start;
287	return -1;
288}
289
290#ifdef BIT
291#undef BIT
292#endif
293#define BIT(x)  (1 << (x))
294
295static const unsigned sparc_limit_flags_class_flags[] = { BIT(REG_FLAGS_CLASS_FLAGS) };
296static const unsigned sparc_limit_gp_sp[] = { BIT(REG_GP_SP), 0 };
297static const unsigned sparc_limit_gp_frame_pointer[] = { BIT(REG_GP_FRAME_POINTER), 0 };
298static const unsigned sparc_limit_fpflags_class_fpflags[] = { BIT(REG_FPFLAGS_CLASS_FPFLAGS) };
299
300static const arch_register_req_t sparc_requirements_gp_gp = {
301	arch_register_req_type_normal,
302	& sparc_reg_classes[CLASS_sparc_gp],
303	NULL,        /* limit bitset */
304	0,           /* same pos */
305	0,           /* different pos */
306	1            /* width */
307};
308
309
310static const arch_register_req_t sparc_requirements_flags_class_flags = {
311	arch_register_req_type_limited,
312	& sparc_reg_classes[CLASS_sparc_flags_class],
313	sparc_limit_flags_class_flags,
314	0,        /* same pos */
315	0,       /* different pos */
316	1             /* width */
317};
318
319
320static const arch_register_req_t sparc_requirements__none = {
321	arch_register_req_type_none,
322	NULL,                         /* regclass */
323	NULL,                         /* limit bitset */
324	0,                            /* same pos */
325	0,                            /* different pos */
326	0                             /* width */
327};
328
329
330static const arch_register_req_t sparc_requirements_fp_fp = {
331	arch_register_req_type_normal,
332	& sparc_reg_classes[CLASS_sparc_fp],
333	NULL,        /* limit bitset */
334	0,           /* same pos */
335	0,           /* different pos */
336	1            /* width */
337};
338
339
340static const arch_register_req_t sparc_requirements_fp_fp_a_4 = {
341	arch_register_req_type_aligned | arch_register_req_type_normal,
342	& sparc_reg_classes[CLASS_sparc_fp],
343	NULL,        /* limit bitset */
344	0,           /* same pos */
345	0,           /* different pos */
346	4            /* width */
347};
348
349
350static const arch_register_req_t sparc_requirements_fp_fp_a_2 = {
351	arch_register_req_type_aligned | arch_register_req_type_normal,
352	& sparc_reg_classes[CLASS_sparc_fp],
353	NULL,        /* limit bitset */
354	0,           /* same pos */
355	0,           /* different pos */
356	2            /* width */
357};
358
359
360static const arch_register_req_t sparc_requirements_gp_sp = {
361	arch_register_req_type_limited,
362	& sparc_reg_classes[CLASS_sparc_gp],
363	sparc_limit_gp_sp,
364	0,        /* same pos */
365	0,       /* different pos */
366	1             /* width */
367};
368
369
370static const arch_register_req_t sparc_requirements_gp_frame_pointer = {
371	arch_register_req_type_limited,
372	& sparc_reg_classes[CLASS_sparc_gp],
373	sparc_limit_gp_frame_pointer,
374	0,        /* same pos */
375	0,       /* different pos */
376	1             /* width */
377};
378
379
380static const arch_register_req_t sparc_requirements_gp_sp_I_S = {
381	arch_register_req_type_ignore | arch_register_req_type_produces_sp | arch_register_req_type_limited,
382	& sparc_reg_classes[CLASS_sparc_gp],
383	sparc_limit_gp_sp,
384	0,        /* same pos */
385	0,       /* different pos */
386	1             /* width */
387};
388
389
390static const arch_register_req_t sparc_requirements_fpflags_class_fpflags = {
391	arch_register_req_type_limited,
392	& sparc_reg_classes[CLASS_sparc_fpflags_class],
393	sparc_limit_fpflags_class_fpflags,
394	0,        /* same pos */
395	0,       /* different pos */
396	1             /* width */
397};
398
399
400
401/**
402 * construct SubCCZero node
403 */
404ir_node *new_bd_sparc_SubCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
405{
406	ir_graph         *irg        = get_irn_irg(block);
407	ir_op            *op         = op_sparc_SubCCZero;
408	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
409	ir_node          *res;
410	backend_info_t   *info;
411	int             arity   = 1;
412	ir_node        *in[1];
413	int             n_res   = 1;
414	ir_mode        *mode    = mode_Bu;
415	static const arch_register_req_t *in_reqs[] =
416	{
417		& sparc_requirements_gp_gp,
418	};
419
420	/* construct in array */
421	in[0] = left;
422
423	/* flags */
424	irn_flags_ |= arch_irn_flags_rematerializable;
425
426	/* create node */
427	assert(op != NULL);
428	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
429
430	/* init node attributes */
431		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
432	sparc_set_attr_imm(res, immediate_entity, immediate_value);
433	info = be_get_info(res);
434	(void) info; /* avoid potential warning */
435	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
436
437
438	/* optimize node */
439	res = optimize_node(res);
440	irn_verify_irg(res, irg);
441
442	return res;
443}
444
445/**
446 * construct SubCCZero node
447 */
448ir_node *new_bd_sparc_SubCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
449{
450	ir_graph         *irg        = get_irn_irg(block);
451	ir_op            *op         = op_sparc_SubCCZero;
452	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
453	ir_node          *res;
454	backend_info_t   *info;
455	int             arity   = 2;
456	ir_node        *in[2];
457	int             n_res   = 1;
458	ir_mode        *mode    = mode_Bu;
459	static const arch_register_req_t *in_reqs[] =
460	{
461		& sparc_requirements_gp_gp,
462		& sparc_requirements_gp_gp,
463	};
464
465	/* construct in array */
466	in[0] = left;
467	in[1] = right;
468
469	/* flags */
470	irn_flags_ |= arch_irn_flags_rematerializable;
471
472	/* create node */
473	assert(op != NULL);
474	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
475
476	/* init node attributes */
477		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
478
479	info = be_get_info(res);
480	(void) info; /* avoid potential warning */
481	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
482
483
484	/* optimize node */
485	res = optimize_node(res);
486	irn_verify_irg(res, irg);
487
488	return res;
489}
490
491/**
492 * construct Sra node
493 */
494ir_node *new_bd_sparc_Sra_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
495{
496	ir_graph         *irg        = get_irn_irg(block);
497	ir_op            *op         = op_sparc_Sra;
498	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
499	ir_node          *res;
500	backend_info_t   *info;
501	int             arity   = 1;
502	ir_node        *in[1];
503	int             n_res   = 1;
504	ir_mode        *mode    = mode_Iu;
505	static const arch_register_req_t *in_reqs[] =
506	{
507		& sparc_requirements_gp_gp,
508	};
509
510	/* construct in array */
511	in[0] = left;
512
513	/* flags */
514	irn_flags_ |= arch_irn_flags_rematerializable;
515
516	/* create node */
517	assert(op != NULL);
518	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
519
520	/* init node attributes */
521		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
522	sparc_set_attr_imm(res, immediate_entity, immediate_value);
523	info = be_get_info(res);
524	(void) info; /* avoid potential warning */
525	info->out_infos[0].req = &sparc_requirements_gp_gp;
526
527
528	/* optimize node */
529	res = optimize_node(res);
530	irn_verify_irg(res, irg);
531
532	return res;
533}
534
535/**
536 * construct Sra node
537 */
538ir_node *new_bd_sparc_Sra_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
539{
540	ir_graph         *irg        = get_irn_irg(block);
541	ir_op            *op         = op_sparc_Sra;
542	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
543	ir_node          *res;
544	backend_info_t   *info;
545	int             arity   = 2;
546	ir_node        *in[2];
547	int             n_res   = 1;
548	ir_mode        *mode    = mode_Iu;
549	static const arch_register_req_t *in_reqs[] =
550	{
551		& sparc_requirements_gp_gp,
552		& sparc_requirements_gp_gp,
553	};
554
555	/* construct in array */
556	in[0] = left;
557	in[1] = right;
558
559	/* flags */
560	irn_flags_ |= arch_irn_flags_rematerializable;
561
562	/* create node */
563	assert(op != NULL);
564	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
565
566	/* init node attributes */
567		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
568
569	info = be_get_info(res);
570	(void) info; /* avoid potential warning */
571	info->out_infos[0].req = &sparc_requirements_gp_gp;
572
573
574	/* optimize node */
575	res = optimize_node(res);
576	irn_verify_irg(res, irg);
577
578	return res;
579}
580
581/**
582 * construct Ld node
583 */
584ir_node *new_bd_sparc_Ld_imm(dbg_info *dbgi, ir_node *block, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
585{
586	ir_graph         *irg        = get_irn_irg(block);
587	ir_op            *op         = op_sparc_Ld;
588	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
589	ir_node          *res;
590	backend_info_t   *info;
591	int             arity   = 2;
592	ir_node        *in[2];
593	int             n_res   = 2;
594	ir_mode        *mode    = mode_T;
595	static const arch_register_req_t *in_reqs[] =
596	{
597		& sparc_requirements_gp_gp,
598		& sparc_requirements__none,
599	};
600
601	/* construct in array */
602	in[0] = ptr;
603	in[1] = mem;
604
605	/* create node */
606	assert(op != NULL);
607	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
608
609	/* init node attributes */
610		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
611	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
612	info = be_get_info(res);
613	(void) info; /* avoid potential warning */
614	info->out_infos[0].req = &sparc_requirements_gp_gp;
615	info->out_infos[1].req = &sparc_requirements__none;
616
617
618	/* optimize node */
619	res = optimize_node(res);
620	irn_verify_irg(res, irg);
621
622	return res;
623}
624
625/**
626 * construct Ld node
627 */
628ir_node *new_bd_sparc_Ld_reg(dbg_info *dbgi, ir_node *block, ir_node *ptr, ir_node *ptr2, ir_node *mem, ir_mode *ls_mode)
629{
630	ir_graph         *irg        = get_irn_irg(block);
631	ir_op            *op         = op_sparc_Ld;
632	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
633	ir_node          *res;
634	backend_info_t   *info;
635	int             arity   = 3;
636	ir_node        *in[3];
637	int             n_res   = 2;
638	ir_mode        *mode    = mode_T;
639	static const arch_register_req_t *in_reqs[] =
640	{
641		& sparc_requirements_gp_gp,
642		& sparc_requirements_gp_gp,
643		& sparc_requirements__none,
644	};
645
646	/* construct in array */
647	in[0] = ptr;
648	in[1] = ptr2;
649	in[2] = mem;
650
651	/* create node */
652	assert(op != NULL);
653	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
654
655	/* init node attributes */
656		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
657	init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);
658	info = be_get_info(res);
659	(void) info; /* avoid potential warning */
660	info->out_infos[0].req = &sparc_requirements_gp_gp;
661	info->out_infos[1].req = &sparc_requirements__none;
662
663
664	/* optimize node */
665	res = optimize_node(res);
666	irn_verify_irg(res, irg);
667
668	return res;
669}
670
671/**
672 * construct fitof node
673 */
674ir_node *new_bd_sparc_fitof_q(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
675{
676	ir_graph         *irg        = get_irn_irg(block);
677	ir_op            *op         = op_sparc_fitof;
678	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
679	ir_node          *res;
680	backend_info_t   *info;
681	int             arity   = 1;
682	ir_node        *in[1];
683	int             n_res   = 1;
684	ir_mode        *mode    = mode_Q;
685	static const arch_register_req_t *in_reqs[] =
686	{
687		& sparc_requirements_fp_fp,
688	};
689
690	/* construct in array */
691	in[0] = op0;
692
693	/* flags */
694	irn_flags_ |= arch_irn_flags_rematerializable;
695
696	/* create node */
697	assert(op != NULL);
698	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
699
700	/* init node attributes */
701		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
702	init_sparc_fp_attributes(res, fp_mode);
703
704
705	info = be_get_info(res);
706	(void) info; /* avoid potential warning */
707	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
708
709
710	/* optimize node */
711	res = optimize_node(res);
712	irn_verify_irg(res, irg);
713
714	return res;
715}
716
717/**
718 * construct fitof node
719 */
720ir_node *new_bd_sparc_fitof_d(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
721{
722	ir_graph         *irg        = get_irn_irg(block);
723	ir_op            *op         = op_sparc_fitof;
724	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
725	ir_node          *res;
726	backend_info_t   *info;
727	int             arity   = 1;
728	ir_node        *in[1];
729	int             n_res   = 1;
730	ir_mode        *mode    = mode_D;
731	static const arch_register_req_t *in_reqs[] =
732	{
733		& sparc_requirements_fp_fp,
734	};
735
736	/* construct in array */
737	in[0] = op0;
738
739	/* flags */
740	irn_flags_ |= arch_irn_flags_rematerializable;
741
742	/* create node */
743	assert(op != NULL);
744	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
745
746	/* init node attributes */
747		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
748	init_sparc_fp_attributes(res, fp_mode);
749
750
751	info = be_get_info(res);
752	(void) info; /* avoid potential warning */
753	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
754
755
756	/* optimize node */
757	res = optimize_node(res);
758	irn_verify_irg(res, irg);
759
760	return res;
761}
762
763/**
764 * construct fitof node
765 */
766ir_node *new_bd_sparc_fitof_s(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
767{
768	ir_graph         *irg        = get_irn_irg(block);
769	ir_op            *op         = op_sparc_fitof;
770	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
771	ir_node          *res;
772	backend_info_t   *info;
773	int             arity   = 1;
774	ir_node        *in[1];
775	int             n_res   = 1;
776	ir_mode        *mode    = mode_F;
777	static const arch_register_req_t *in_reqs[] =
778	{
779		& sparc_requirements_fp_fp,
780	};
781
782	/* construct in array */
783	in[0] = op0;
784
785	/* flags */
786	irn_flags_ |= arch_irn_flags_rematerializable;
787
788	/* create node */
789	assert(op != NULL);
790	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
791
792	/* init node attributes */
793		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
794	init_sparc_fp_attributes(res, fp_mode);
795
796
797	info = be_get_info(res);
798	(void) info; /* avoid potential warning */
799	info->out_infos[0].req = &sparc_requirements_fp_fp;
800
801
802	/* optimize node */
803	res = optimize_node(res);
804	irn_verify_irg(res, irg);
805
806	return res;
807}
808
809/**
810 * construct fadd node
811 */
812ir_node *new_bd_sparc_fadd_q(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
813{
814	ir_graph         *irg        = get_irn_irg(block);
815	ir_op            *op         = op_sparc_fadd;
816	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
817	ir_node          *res;
818	backend_info_t   *info;
819	int             arity   = 2;
820	ir_node        *in[2];
821	int             n_res   = 1;
822	ir_mode        *mode    = mode_Q;
823	static const arch_register_req_t *in_reqs[] =
824	{
825		& sparc_requirements_fp_fp_a_4,
826		& sparc_requirements_fp_fp_a_4,
827	};
828
829	/* construct in array */
830	in[0] = left;
831	in[1] = right;
832
833	/* flags */
834	irn_flags_ |= arch_irn_flags_rematerializable;
835
836	/* create node */
837	assert(op != NULL);
838	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
839
840	/* init node attributes */
841		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
842	init_sparc_fp_attributes(res, fp_mode);
843
844
845	info = be_get_info(res);
846	(void) info; /* avoid potential warning */
847	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
848
849
850	/* optimize node */
851	res = optimize_node(res);
852	irn_verify_irg(res, irg);
853
854	return res;
855}
856
857/**
858 * construct fadd node
859 */
860ir_node *new_bd_sparc_fadd_d(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
861{
862	ir_graph         *irg        = get_irn_irg(block);
863	ir_op            *op         = op_sparc_fadd;
864	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
865	ir_node          *res;
866	backend_info_t   *info;
867	int             arity   = 2;
868	ir_node        *in[2];
869	int             n_res   = 1;
870	ir_mode        *mode    = mode_D;
871	static const arch_register_req_t *in_reqs[] =
872	{
873		& sparc_requirements_fp_fp_a_2,
874		& sparc_requirements_fp_fp_a_2,
875	};
876
877	/* construct in array */
878	in[0] = left;
879	in[1] = right;
880
881	/* flags */
882	irn_flags_ |= arch_irn_flags_rematerializable;
883
884	/* create node */
885	assert(op != NULL);
886	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
887
888	/* init node attributes */
889		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
890	init_sparc_fp_attributes(res, fp_mode);
891
892
893	info = be_get_info(res);
894	(void) info; /* avoid potential warning */
895	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
896
897
898	/* optimize node */
899	res = optimize_node(res);
900	irn_verify_irg(res, irg);
901
902	return res;
903}
904
905/**
906 * construct fadd node
907 */
908ir_node *new_bd_sparc_fadd_s(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
909{
910	ir_graph         *irg        = get_irn_irg(block);
911	ir_op            *op         = op_sparc_fadd;
912	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
913	ir_node          *res;
914	backend_info_t   *info;
915	int             arity   = 2;
916	ir_node        *in[2];
917	int             n_res   = 1;
918	ir_mode        *mode    = mode_F;
919	static const arch_register_req_t *in_reqs[] =
920	{
921		& sparc_requirements_fp_fp,
922		& sparc_requirements_fp_fp,
923	};
924
925	/* construct in array */
926	in[0] = left;
927	in[1] = right;
928
929	/* flags */
930	irn_flags_ |= arch_irn_flags_rematerializable;
931
932	/* create node */
933	assert(op != NULL);
934	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
935
936	/* init node attributes */
937		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
938	init_sparc_fp_attributes(res, fp_mode);
939
940
941	info = be_get_info(res);
942	(void) info; /* avoid potential warning */
943	info->out_infos[0].req = &sparc_requirements_fp_fp;
944
945
946	/* optimize node */
947	res = optimize_node(res);
948	irn_verify_irg(res, irg);
949
950	return res;
951}
952
953/**
954 * construct Start node
955 */
956ir_node *new_bd_sparc_Start(dbg_info *dbgi, ir_node *block, int n_res)
957{
958	ir_graph         *irg        = get_irn_irg(block);
959	ir_op            *op         = op_sparc_Start;
960	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
961	ir_node          *res;
962	backend_info_t   *info;
963	int             arity   = 0;
964	ir_node       **in      = NULL;
965	ir_mode        *mode    = mode_T;
966	static const arch_register_req_t **in_reqs = NULL;
967
968	/* create node */
969	assert(op != NULL);
970	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
971
972	/* init node attributes */
973		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
974
975	info = be_get_info(res);
976	(void) info; /* avoid potential warning */
977
978
979	/* optimize node */
980	res = optimize_node(res);
981	irn_verify_irg(res, irg);
982
983	return res;
984}
985
986/**
987 * construct RestoreZero node
988 */
989ir_node *new_bd_sparc_RestoreZero(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *frame_pointer)
990{
991	ir_graph         *irg        = get_irn_irg(block);
992	ir_op            *op         = op_sparc_RestoreZero;
993	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
994	ir_node          *res;
995	backend_info_t   *info;
996	int             arity   = 2;
997	ir_node        *in[2];
998	int             n_res   = 1;
999	ir_mode        *mode    = mode_Iu;
1000	static const arch_register_req_t *in_reqs[] =
1001	{
1002		& sparc_requirements_gp_sp,
1003		& sparc_requirements_gp_frame_pointer,
1004	};
1005
1006	/* construct in array */
1007	in[0] = stack;
1008	in[1] = frame_pointer;
1009
1010	/* create node */
1011	assert(op != NULL);
1012	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1013
1014	/* init node attributes */
1015		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1016
1017	info = be_get_info(res);
1018	(void) info; /* avoid potential warning */
1019	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
1020
1021
1022	/* optimize node */
1023	res = optimize_node(res);
1024	irn_verify_irg(res, irg);
1025
1026	return res;
1027}
1028
1029/**
1030 * construct SetHi node
1031 */
1032ir_node *new_bd_sparc_SetHi(dbg_info *dbgi, ir_node *block, ir_entity *entity, int32_t immediate_value)
1033{
1034	ir_graph         *irg        = get_irn_irg(block);
1035	ir_op            *op         = op_sparc_SetHi;
1036	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1037	ir_node          *res;
1038	backend_info_t   *info;
1039	int             arity   = 0;
1040	ir_node       **in      = NULL;
1041	int             n_res   = 1;
1042	ir_mode        *mode    = mode_Iu;
1043	static const arch_register_req_t **in_reqs = NULL;
1044
1045	/* flags */
1046	irn_flags_ |= arch_irn_flags_rematerializable;
1047
1048	/* create node */
1049	assert(op != NULL);
1050	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1051
1052	/* init node attributes */
1053		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1054	sparc_set_attr_imm(res, entity, immediate_value);
1055	info = be_get_info(res);
1056	(void) info; /* avoid potential warning */
1057	info->out_infos[0].req = &sparc_requirements_gp_gp;
1058
1059
1060	/* optimize node */
1061	res = optimize_node(res);
1062	irn_verify_irg(res, irg);
1063
1064	return res;
1065}
1066
1067/**
1068 * construct Xor node
1069 */
1070ir_node *new_bd_sparc_Xor_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1071{
1072	ir_graph         *irg        = get_irn_irg(block);
1073	ir_op            *op         = op_sparc_Xor;
1074	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1075	ir_node          *res;
1076	backend_info_t   *info;
1077	int             arity   = 1;
1078	ir_node        *in[1];
1079	int             n_res   = 1;
1080	ir_mode        *mode    = mode_Iu;
1081	static const arch_register_req_t *in_reqs[] =
1082	{
1083		& sparc_requirements_gp_gp,
1084	};
1085
1086	/* construct in array */
1087	in[0] = left;
1088
1089	/* flags */
1090	irn_flags_ |= arch_irn_flags_rematerializable;
1091
1092	/* create node */
1093	assert(op != NULL);
1094	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1095
1096	/* init node attributes */
1097		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1098	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1099	info = be_get_info(res);
1100	(void) info; /* avoid potential warning */
1101	info->out_infos[0].req = &sparc_requirements_gp_gp;
1102
1103
1104	/* optimize node */
1105	res = optimize_node(res);
1106	irn_verify_irg(res, irg);
1107
1108	return res;
1109}
1110
1111/**
1112 * construct Xor node
1113 */
1114ir_node *new_bd_sparc_Xor_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
1115{
1116	ir_graph         *irg        = get_irn_irg(block);
1117	ir_op            *op         = op_sparc_Xor;
1118	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1119	ir_node          *res;
1120	backend_info_t   *info;
1121	int             arity   = 2;
1122	ir_node        *in[2];
1123	int             n_res   = 1;
1124	ir_mode        *mode    = mode_Iu;
1125	static const arch_register_req_t *in_reqs[] =
1126	{
1127		& sparc_requirements_gp_gp,
1128		& sparc_requirements_gp_gp,
1129	};
1130
1131	/* construct in array */
1132	in[0] = left;
1133	in[1] = right;
1134
1135	/* flags */
1136	irn_flags_ |= arch_irn_flags_rematerializable;
1137
1138	/* create node */
1139	assert(op != NULL);
1140	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1141
1142	/* init node attributes */
1143		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1144
1145	info = be_get_info(res);
1146	(void) info; /* avoid potential warning */
1147	info->out_infos[0].req = &sparc_requirements_gp_gp;
1148
1149
1150	/* optimize node */
1151	res = optimize_node(res);
1152	irn_verify_irg(res, irg);
1153
1154	return res;
1155}
1156
1157/**
1158 * construct Or node
1159 */
1160ir_node *new_bd_sparc_Or_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1161{
1162	ir_graph         *irg        = get_irn_irg(block);
1163	ir_op            *op         = op_sparc_Or;
1164	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1165	ir_node          *res;
1166	backend_info_t   *info;
1167	int             arity   = 1;
1168	ir_node        *in[1];
1169	int             n_res   = 1;
1170	ir_mode        *mode    = mode_Iu;
1171	static const arch_register_req_t *in_reqs[] =
1172	{
1173		& sparc_requirements_gp_gp,
1174	};
1175
1176	/* construct in array */
1177	in[0] = left;
1178
1179	/* flags */
1180	irn_flags_ |= arch_irn_flags_rematerializable;
1181
1182	/* create node */
1183	assert(op != NULL);
1184	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1185
1186	/* init node attributes */
1187		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1188	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1189	info = be_get_info(res);
1190	(void) info; /* avoid potential warning */
1191	info->out_infos[0].req = &sparc_requirements_gp_gp;
1192
1193
1194	/* optimize node */
1195	res = optimize_node(res);
1196	irn_verify_irg(res, irg);
1197
1198	return res;
1199}
1200
1201/**
1202 * construct Or node
1203 */
1204ir_node *new_bd_sparc_Or_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
1205{
1206	ir_graph         *irg        = get_irn_irg(block);
1207	ir_op            *op         = op_sparc_Or;
1208	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1209	ir_node          *res;
1210	backend_info_t   *info;
1211	int             arity   = 2;
1212	ir_node        *in[2];
1213	int             n_res   = 1;
1214	ir_mode        *mode    = mode_Iu;
1215	static const arch_register_req_t *in_reqs[] =
1216	{
1217		& sparc_requirements_gp_gp,
1218		& sparc_requirements_gp_gp,
1219	};
1220
1221	/* construct in array */
1222	in[0] = left;
1223	in[1] = right;
1224
1225	/* flags */
1226	irn_flags_ |= arch_irn_flags_rematerializable;
1227
1228	/* create node */
1229	assert(op != NULL);
1230	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1231
1232	/* init node attributes */
1233		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1234
1235	info = be_get_info(res);
1236	(void) info; /* avoid potential warning */
1237	info->out_infos[0].req = &sparc_requirements_gp_gp;
1238
1239
1240	/* optimize node */
1241	res = optimize_node(res);
1242	irn_verify_irg(res, irg);
1243
1244	return res;
1245}
1246
1247/**
1248 * construct Restore node
1249 */
1250ir_node *new_bd_sparc_Restore_imm(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *frame_pointer, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1251{
1252	ir_graph         *irg        = get_irn_irg(block);
1253	ir_op            *op         = op_sparc_Restore;
1254	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1255	ir_node          *res;
1256	backend_info_t   *info;
1257	int             arity   = 3;
1258	ir_node        *in[3];
1259	int             n_res   = 2;
1260	ir_mode        *mode    = mode_T;
1261	static const arch_register_req_t *in_reqs[] =
1262	{
1263		& sparc_requirements_gp_sp,
1264		& sparc_requirements_gp_frame_pointer,
1265		& sparc_requirements_gp_gp,
1266	};
1267
1268	/* construct in array */
1269	in[0] = stack;
1270	in[1] = frame_pointer;
1271	in[2] = left;
1272
1273	/* create node */
1274	assert(op != NULL);
1275	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1276
1277	/* init node attributes */
1278		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1279	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1280	info = be_get_info(res);
1281	(void) info; /* avoid potential warning */
1282	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
1283	info->out_infos[1].req = &sparc_requirements_gp_gp;
1284
1285
1286	/* optimize node */
1287	res = optimize_node(res);
1288	irn_verify_irg(res, irg);
1289
1290	return res;
1291}
1292
1293/**
1294 * construct Restore node
1295 */
1296ir_node *new_bd_sparc_Restore_reg(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *frame_pointer, ir_node *left, ir_node *right)
1297{
1298	ir_graph         *irg        = get_irn_irg(block);
1299	ir_op            *op         = op_sparc_Restore;
1300	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1301	ir_node          *res;
1302	backend_info_t   *info;
1303	int             arity   = 4;
1304	ir_node        *in[4];
1305	int             n_res   = 2;
1306	ir_mode        *mode    = mode_T;
1307	static const arch_register_req_t *in_reqs[] =
1308	{
1309		& sparc_requirements_gp_sp,
1310		& sparc_requirements_gp_frame_pointer,
1311		& sparc_requirements_gp_gp,
1312		& sparc_requirements_gp_gp,
1313	};
1314
1315	/* construct in array */
1316	in[0] = stack;
1317	in[1] = frame_pointer;
1318	in[2] = left;
1319	in[3] = right;
1320
1321	/* create node */
1322	assert(op != NULL);
1323	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1324
1325	/* init node attributes */
1326		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1327
1328	info = be_get_info(res);
1329	(void) info; /* avoid potential warning */
1330	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
1331	info->out_infos[1].req = &sparc_requirements_gp_gp;
1332
1333
1334	/* optimize node */
1335	res = optimize_node(res);
1336	irn_verify_irg(res, irg);
1337
1338	return res;
1339}
1340
1341/**
1342 * construct SubX_t node
1343 */
1344ir_node *new_bd_sparc_SubX_t(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_node *flags_input, ir_mode *mode)
1345{
1346	ir_graph         *irg        = get_irn_irg(block);
1347	ir_op            *op         = op_sparc_SubX_t;
1348	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1349	ir_node          *res;
1350	backend_info_t   *info;
1351	int             arity   = 3;
1352	ir_node        *in[3];
1353	int             n_res   = 0;
1354	static const arch_register_req_t **in_reqs = NULL;
1355
1356	/* construct in array */
1357	in[0] = left;
1358	in[1] = right;
1359	in[2] = flags_input;
1360
1361	/* create node */
1362	assert(op != NULL);
1363	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1364
1365	/* init node attributes */
1366	(void)in;(void)irn_flags_;(void)in_reqs;(void)n_res;
1367
1368	info = be_get_info(res);
1369	(void) info; /* avoid potential warning */
1370
1371
1372	/* optimize node */
1373	res = optimize_node(res);
1374	irn_verify_irg(res, irg);
1375
1376	return res;
1377}
1378
1379/**
1380 * construct UMulh node
1381 */
1382ir_node *new_bd_sparc_UMulh_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1383{
1384	ir_graph         *irg        = get_irn_irg(block);
1385	ir_op            *op         = op_sparc_UMulh;
1386	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1387	ir_node          *res;
1388	backend_info_t   *info;
1389	int             arity   = 1;
1390	ir_node        *in[1];
1391	int             n_res   = 1;
1392	ir_mode        *mode    = mode_T;
1393	static const arch_register_req_t *in_reqs[] =
1394	{
1395		& sparc_requirements_gp_gp,
1396	};
1397
1398	/* construct in array */
1399	in[0] = left;
1400
1401	/* flags */
1402	irn_flags_ |= arch_irn_flags_rematerializable;
1403
1404	/* create node */
1405	assert(op != NULL);
1406	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1407
1408	/* init node attributes */
1409		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1410	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1411	info = be_get_info(res);
1412	(void) info; /* avoid potential warning */
1413	info->out_infos[0].req = &sparc_requirements_gp_gp;
1414
1415
1416	/* optimize node */
1417	res = optimize_node(res);
1418	irn_verify_irg(res, irg);
1419
1420	return res;
1421}
1422
1423/**
1424 * construct UMulh node
1425 */
1426ir_node *new_bd_sparc_UMulh_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
1427{
1428	ir_graph         *irg        = get_irn_irg(block);
1429	ir_op            *op         = op_sparc_UMulh;
1430	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1431	ir_node          *res;
1432	backend_info_t   *info;
1433	int             arity   = 2;
1434	ir_node        *in[2];
1435	int             n_res   = 1;
1436	ir_mode        *mode    = mode_T;
1437	static const arch_register_req_t *in_reqs[] =
1438	{
1439		& sparc_requirements_gp_gp,
1440		& sparc_requirements_gp_gp,
1441	};
1442
1443	/* construct in array */
1444	in[0] = left;
1445	in[1] = right;
1446
1447	/* flags */
1448	irn_flags_ |= arch_irn_flags_rematerializable;
1449
1450	/* create node */
1451	assert(op != NULL);
1452	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1453
1454	/* init node attributes */
1455		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1456
1457	info = be_get_info(res);
1458	(void) info; /* avoid potential warning */
1459	info->out_infos[0].req = &sparc_requirements_gp_gp;
1460
1461
1462	/* optimize node */
1463	res = optimize_node(res);
1464	irn_verify_irg(res, irg);
1465
1466	return res;
1467}
1468
1469/**
1470 * construct Ba node
1471 */
1472ir_node *new_bd_sparc_Ba(dbg_info *dbgi, ir_node *block)
1473{
1474	ir_graph         *irg        = get_irn_irg(block);
1475	ir_op            *op         = op_sparc_Ba;
1476	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1477	ir_node          *res;
1478	backend_info_t   *info;
1479	int             arity   = 0;
1480	ir_node       **in      = NULL;
1481	int             n_res   = 1;
1482	ir_mode        *mode    = mode_X;
1483	static const arch_register_req_t **in_reqs = NULL;
1484
1485	/* flags */
1486	irn_flags_ |= arch_irn_flags_simple_jump;
1487
1488	/* create node */
1489	assert(op != NULL);
1490	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1491
1492	/* init node attributes */
1493		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1494
1495	info = be_get_info(res);
1496	(void) info; /* avoid potential warning */
1497	info->out_infos[0].req = &sparc_requirements__none;
1498
1499
1500	/* optimize node */
1501	res = optimize_node(res);
1502	irn_verify_irg(res, irg);
1503
1504	return res;
1505}
1506
1507/**
1508 * construct Cmp node
1509 */
1510ir_node *new_bd_sparc_Cmp_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1511{
1512	ir_graph         *irg        = get_irn_irg(block);
1513	ir_op            *op         = op_sparc_Cmp;
1514	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1515	ir_node          *res;
1516	backend_info_t   *info;
1517	int             arity   = 1;
1518	ir_node        *in[1];
1519	int             n_res   = 1;
1520	ir_mode        *mode    = mode_Bu;
1521	static const arch_register_req_t *in_reqs[] =
1522	{
1523		& sparc_requirements_gp_gp,
1524	};
1525
1526	/* construct in array */
1527	in[0] = left;
1528
1529	/* flags */
1530	irn_flags_ |= arch_irn_flags_rematerializable;
1531
1532	/* create node */
1533	assert(op != NULL);
1534	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1535
1536	/* init node attributes */
1537		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1538	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1539	info = be_get_info(res);
1540	(void) info; /* avoid potential warning */
1541	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
1542
1543
1544	/* optimize node */
1545	res = optimize_node(res);
1546	irn_verify_irg(res, irg);
1547
1548	return res;
1549}
1550
1551/**
1552 * construct Cmp node
1553 */
1554ir_node *new_bd_sparc_Cmp_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
1555{
1556	ir_graph         *irg        = get_irn_irg(block);
1557	ir_op            *op         = op_sparc_Cmp;
1558	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1559	ir_node          *res;
1560	backend_info_t   *info;
1561	int             arity   = 2;
1562	ir_node        *in[2];
1563	int             n_res   = 1;
1564	ir_mode        *mode    = mode_Bu;
1565	static const arch_register_req_t *in_reqs[] =
1566	{
1567		& sparc_requirements_gp_gp,
1568		& sparc_requirements_gp_gp,
1569	};
1570
1571	/* construct in array */
1572	in[0] = left;
1573	in[1] = right;
1574
1575	/* flags */
1576	irn_flags_ |= arch_irn_flags_rematerializable;
1577
1578	/* create node */
1579	assert(op != NULL);
1580	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1581
1582	/* init node attributes */
1583		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1584
1585	info = be_get_info(res);
1586	(void) info; /* avoid potential warning */
1587	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
1588
1589
1590	/* optimize node */
1591	res = optimize_node(res);
1592	irn_verify_irg(res, irg);
1593
1594	return res;
1595}
1596
1597/**
1598 * construct fftof node
1599 */
1600ir_node *new_bd_sparc_fftof_d_s(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1601{
1602	ir_graph         *irg        = get_irn_irg(block);
1603	ir_op            *op         = op_sparc_fftof;
1604	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1605	ir_node          *res;
1606	backend_info_t   *info;
1607	int             arity   = 1;
1608	ir_node        *in[1];
1609	int             n_res   = 1;
1610	ir_mode        *mode    = mode_F;
1611	static const arch_register_req_t *in_reqs[] =
1612	{
1613		& sparc_requirements_fp_fp_a_2,
1614	};
1615
1616	/* construct in array */
1617	in[0] = op0;
1618
1619	/* flags */
1620	irn_flags_ |= arch_irn_flags_rematerializable;
1621
1622	/* create node */
1623	assert(op != NULL);
1624	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1625
1626	/* init node attributes */
1627		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1628
1629
1630	info = be_get_info(res);
1631	(void) info; /* avoid potential warning */
1632	info->out_infos[0].req = &sparc_requirements_fp_fp;
1633
1634
1635	/* optimize node */
1636	res = optimize_node(res);
1637	irn_verify_irg(res, irg);
1638
1639	return res;
1640}
1641
1642/**
1643 * construct fftof node
1644 */
1645ir_node *new_bd_sparc_fftof_q_s(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1646{
1647	ir_graph         *irg        = get_irn_irg(block);
1648	ir_op            *op         = op_sparc_fftof;
1649	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1650	ir_node          *res;
1651	backend_info_t   *info;
1652	int             arity   = 1;
1653	ir_node        *in[1];
1654	int             n_res   = 1;
1655	ir_mode        *mode    = mode_F;
1656	static const arch_register_req_t *in_reqs[] =
1657	{
1658		& sparc_requirements_fp_fp_a_4,
1659	};
1660
1661	/* construct in array */
1662	in[0] = op0;
1663
1664	/* flags */
1665	irn_flags_ |= arch_irn_flags_rematerializable;
1666
1667	/* create node */
1668	assert(op != NULL);
1669	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1670
1671	/* init node attributes */
1672		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1673
1674
1675	info = be_get_info(res);
1676	(void) info; /* avoid potential warning */
1677	info->out_infos[0].req = &sparc_requirements_fp_fp;
1678
1679
1680	/* optimize node */
1681	res = optimize_node(res);
1682	irn_verify_irg(res, irg);
1683
1684	return res;
1685}
1686
1687/**
1688 * construct fftof node
1689 */
1690ir_node *new_bd_sparc_fftof_q_d(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1691{
1692	ir_graph         *irg        = get_irn_irg(block);
1693	ir_op            *op         = op_sparc_fftof;
1694	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1695	ir_node          *res;
1696	backend_info_t   *info;
1697	int             arity   = 1;
1698	ir_node        *in[1];
1699	int             n_res   = 1;
1700	ir_mode        *mode    = mode_D;
1701	static const arch_register_req_t *in_reqs[] =
1702	{
1703		& sparc_requirements_fp_fp_a_4,
1704	};
1705
1706	/* construct in array */
1707	in[0] = op0;
1708
1709	/* flags */
1710	irn_flags_ |= arch_irn_flags_rematerializable;
1711
1712	/* create node */
1713	assert(op != NULL);
1714	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1715
1716	/* init node attributes */
1717		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1718
1719
1720	info = be_get_info(res);
1721	(void) info; /* avoid potential warning */
1722	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
1723
1724
1725	/* optimize node */
1726	res = optimize_node(res);
1727	irn_verify_irg(res, irg);
1728
1729	return res;
1730}
1731
1732/**
1733 * construct fftof node
1734 */
1735ir_node *new_bd_sparc_fftof_s_q(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1736{
1737	ir_graph         *irg        = get_irn_irg(block);
1738	ir_op            *op         = op_sparc_fftof;
1739	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1740	ir_node          *res;
1741	backend_info_t   *info;
1742	int             arity   = 1;
1743	ir_node        *in[1];
1744	int             n_res   = 1;
1745	ir_mode        *mode    = mode_Q;
1746	static const arch_register_req_t *in_reqs[] =
1747	{
1748		& sparc_requirements_fp_fp,
1749	};
1750
1751	/* construct in array */
1752	in[0] = op0;
1753
1754	/* flags */
1755	irn_flags_ |= arch_irn_flags_rematerializable;
1756
1757	/* create node */
1758	assert(op != NULL);
1759	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1760
1761	/* init node attributes */
1762		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1763
1764
1765	info = be_get_info(res);
1766	(void) info; /* avoid potential warning */
1767	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
1768
1769
1770	/* optimize node */
1771	res = optimize_node(res);
1772	irn_verify_irg(res, irg);
1773
1774	return res;
1775}
1776
1777/**
1778 * construct fftof node
1779 */
1780ir_node *new_bd_sparc_fftof_s_d(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1781{
1782	ir_graph         *irg        = get_irn_irg(block);
1783	ir_op            *op         = op_sparc_fftof;
1784	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1785	ir_node          *res;
1786	backend_info_t   *info;
1787	int             arity   = 1;
1788	ir_node        *in[1];
1789	int             n_res   = 1;
1790	ir_mode        *mode    = mode_D;
1791	static const arch_register_req_t *in_reqs[] =
1792	{
1793		& sparc_requirements_fp_fp,
1794	};
1795
1796	/* construct in array */
1797	in[0] = op0;
1798
1799	/* flags */
1800	irn_flags_ |= arch_irn_flags_rematerializable;
1801
1802	/* create node */
1803	assert(op != NULL);
1804	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1805
1806	/* init node attributes */
1807		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1808
1809
1810	info = be_get_info(res);
1811	(void) info; /* avoid potential warning */
1812	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
1813
1814
1815	/* optimize node */
1816	res = optimize_node(res);
1817	irn_verify_irg(res, irg);
1818
1819	return res;
1820}
1821
1822/**
1823 * construct fftof node
1824 */
1825ir_node *new_bd_sparc_fftof_d_q(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *src_mode, ir_mode *dest_mode)
1826{
1827	ir_graph         *irg        = get_irn_irg(block);
1828	ir_op            *op         = op_sparc_fftof;
1829	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1830	ir_node          *res;
1831	backend_info_t   *info;
1832	int             arity   = 1;
1833	ir_node        *in[1];
1834	int             n_res   = 1;
1835	ir_mode        *mode    = mode_Q;
1836	static const arch_register_req_t *in_reqs[] =
1837	{
1838		& sparc_requirements_fp_fp_a_2,
1839	};
1840
1841	/* construct in array */
1842	in[0] = op0;
1843
1844	/* flags */
1845	irn_flags_ |= arch_irn_flags_rematerializable;
1846
1847	/* create node */
1848	assert(op != NULL);
1849	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1850
1851	/* init node attributes */
1852		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);	init_sparc_fp_conv_attributes(res, src_mode, dest_mode);
1853
1854
1855	info = be_get_info(res);
1856	(void) info; /* avoid potential warning */
1857	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
1858
1859
1860	/* optimize node */
1861	res = optimize_node(res);
1862	irn_verify_irg(res, irg);
1863
1864	return res;
1865}
1866
1867/**
1868 * construct XNorCCZero node
1869 */
1870ir_node *new_bd_sparc_XNorCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
1871{
1872	ir_graph         *irg        = get_irn_irg(block);
1873	ir_op            *op         = op_sparc_XNorCCZero;
1874	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1875	ir_node          *res;
1876	backend_info_t   *info;
1877	int             arity   = 1;
1878	ir_node        *in[1];
1879	int             n_res   = 1;
1880	ir_mode        *mode    = mode_Bu;
1881	static const arch_register_req_t *in_reqs[] =
1882	{
1883		& sparc_requirements_gp_gp,
1884	};
1885
1886	/* construct in array */
1887	in[0] = left;
1888
1889	/* flags */
1890	irn_flags_ |= arch_irn_flags_rematerializable;
1891
1892	/* create node */
1893	assert(op != NULL);
1894	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1895
1896	/* init node attributes */
1897		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1898	sparc_set_attr_imm(res, immediate_entity, immediate_value);
1899	info = be_get_info(res);
1900	(void) info; /* avoid potential warning */
1901	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
1902
1903
1904	/* optimize node */
1905	res = optimize_node(res);
1906	irn_verify_irg(res, irg);
1907
1908	return res;
1909}
1910
1911/**
1912 * construct XNorCCZero node
1913 */
1914ir_node *new_bd_sparc_XNorCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
1915{
1916	ir_graph         *irg        = get_irn_irg(block);
1917	ir_op            *op         = op_sparc_XNorCCZero;
1918	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1919	ir_node          *res;
1920	backend_info_t   *info;
1921	int             arity   = 2;
1922	ir_node        *in[2];
1923	int             n_res   = 1;
1924	ir_mode        *mode    = mode_Bu;
1925	static const arch_register_req_t *in_reqs[] =
1926	{
1927		& sparc_requirements_gp_gp,
1928		& sparc_requirements_gp_gp,
1929	};
1930
1931	/* construct in array */
1932	in[0] = left;
1933	in[1] = right;
1934
1935	/* flags */
1936	irn_flags_ |= arch_irn_flags_rematerializable;
1937
1938	/* create node */
1939	assert(op != NULL);
1940	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1941
1942	/* init node attributes */
1943		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1944
1945	info = be_get_info(res);
1946	(void) info; /* avoid potential warning */
1947	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
1948
1949
1950	/* optimize node */
1951	res = optimize_node(res);
1952	irn_verify_irg(res, irg);
1953
1954	return res;
1955}
1956
1957/**
1958 * construct Call node
1959 */
1960ir_node *new_bd_sparc_Call_imm(dbg_info *dbgi, ir_node *block, int arity, ir_node *in[], int n_res, ir_entity *entity, int32_t offset, bool aggregate_return)
1961{
1962	ir_graph         *irg        = get_irn_irg(block);
1963	ir_op            *op         = op_sparc_Call;
1964	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1965	ir_node          *res;
1966	backend_info_t   *info;
1967	ir_mode        *mode    = mode_T;
1968	static const arch_register_req_t **in_reqs = NULL;
1969
1970	/* flags */
1971	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
1972
1973	/* create node */
1974	assert(op != NULL);
1975	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
1976
1977	/* init node attributes */
1978		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
1979		sparc_set_attr_imm(res, entity, offset);	if (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);
1980	info = be_get_info(res);
1981	(void) info; /* avoid potential warning */
1982
1983
1984	/* optimize node */
1985	res = optimize_node(res);
1986	irn_verify_irg(res, irg);
1987
1988	return res;
1989}
1990
1991/**
1992 * construct Call node
1993 */
1994ir_node *new_bd_sparc_Call_reg(dbg_info *dbgi, ir_node *block, int arity, ir_node *in[], int n_res, bool aggregate_return)
1995{
1996	ir_graph         *irg        = get_irn_irg(block);
1997	ir_op            *op         = op_sparc_Call;
1998	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
1999	ir_node          *res;
2000	backend_info_t   *info;
2001	ir_mode        *mode    = mode_T;
2002	static const arch_register_req_t **in_reqs = NULL;
2003
2004	/* flags */
2005	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
2006
2007	/* create node */
2008	assert(op != NULL);
2009	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2010
2011	/* init node attributes */
2012		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2013		if (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);
2014	info = be_get_info(res);
2015	(void) info; /* avoid potential warning */
2016
2017
2018	/* optimize node */
2019	res = optimize_node(res);
2020	irn_verify_irg(res, irg);
2021
2022	return res;
2023}
2024
2025/**
2026 * construct AddX node
2027 */
2028ir_node *new_bd_sparc_AddX_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *carry, ir_entity *immediate_entity, int32_t immediate_value)
2029{
2030	ir_graph         *irg        = get_irn_irg(block);
2031	ir_op            *op         = op_sparc_AddX;
2032	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2033	ir_node          *res;
2034	backend_info_t   *info;
2035	int             arity   = 2;
2036	ir_node        *in[2];
2037	int             n_res   = 1;
2038	ir_mode        *mode    = mode_Iu;
2039	static const arch_register_req_t *in_reqs[] =
2040	{
2041		& sparc_requirements_gp_gp,
2042		& sparc_requirements_flags_class_flags,
2043	};
2044
2045	/* construct in array */
2046	in[0] = left;
2047	in[1] = carry;
2048
2049	/* create node */
2050	assert(op != NULL);
2051	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2052
2053	/* init node attributes */
2054		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2055	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2056	info = be_get_info(res);
2057	(void) info; /* avoid potential warning */
2058	info->out_infos[0].req = &sparc_requirements_gp_gp;
2059
2060
2061	/* optimize node */
2062	res = optimize_node(res);
2063	irn_verify_irg(res, irg);
2064
2065	return res;
2066}
2067
2068/**
2069 * construct AddX node
2070 */
2071ir_node *new_bd_sparc_AddX_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_node *carry)
2072{
2073	ir_graph         *irg        = get_irn_irg(block);
2074	ir_op            *op         = op_sparc_AddX;
2075	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2076	ir_node          *res;
2077	backend_info_t   *info;
2078	int             arity   = 3;
2079	ir_node        *in[3];
2080	int             n_res   = 1;
2081	ir_mode        *mode    = mode_Iu;
2082	static const arch_register_req_t *in_reqs[] =
2083	{
2084		& sparc_requirements_gp_gp,
2085		& sparc_requirements_gp_gp,
2086		& sparc_requirements_flags_class_flags,
2087	};
2088
2089	/* construct in array */
2090	in[0] = left;
2091	in[1] = right;
2092	in[2] = carry;
2093
2094	/* create node */
2095	assert(op != NULL);
2096	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2097
2098	/* init node attributes */
2099		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2100
2101	info = be_get_info(res);
2102	(void) info; /* avoid potential warning */
2103	info->out_infos[0].req = &sparc_requirements_gp_gp;
2104
2105
2106	/* optimize node */
2107	res = optimize_node(res);
2108	irn_verify_irg(res, irg);
2109
2110	return res;
2111}
2112
2113/**
2114 * construct SubSP node
2115 */
2116ir_node *new_bd_sparc_SubSP_imm(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *mem, ir_entity *immediate_entity, int32_t immediate_value)
2117{
2118	ir_graph         *irg        = get_irn_irg(block);
2119	ir_op            *op         = op_sparc_SubSP;
2120	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2121	ir_node          *res;
2122	backend_info_t   *info;
2123	int             arity   = 2;
2124	ir_node        *in[2];
2125	int             n_res   = 3;
2126	ir_mode        *mode    = mode_T;
2127	static const arch_register_req_t *in_reqs[] =
2128	{
2129		& sparc_requirements_gp_sp,
2130		& sparc_requirements__none,
2131	};
2132
2133	/* construct in array */
2134	in[0] = stack;
2135	in[1] = mem;
2136
2137	/* create node */
2138	assert(op != NULL);
2139	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2140
2141	/* init node attributes */
2142		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2143	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2144	info = be_get_info(res);
2145	(void) info; /* avoid potential warning */
2146	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
2147	info->out_infos[1].req = &sparc_requirements_gp_gp;
2148	info->out_infos[2].req = &sparc_requirements__none;
2149
2150
2151	/* optimize node */
2152	res = optimize_node(res);
2153	irn_verify_irg(res, irg);
2154
2155	return res;
2156}
2157
2158/**
2159 * construct SubSP node
2160 */
2161ir_node *new_bd_sparc_SubSP_reg(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *size, ir_node *mem)
2162{
2163	ir_graph         *irg        = get_irn_irg(block);
2164	ir_op            *op         = op_sparc_SubSP;
2165	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2166	ir_node          *res;
2167	backend_info_t   *info;
2168	int             arity   = 3;
2169	ir_node        *in[3];
2170	int             n_res   = 3;
2171	ir_mode        *mode    = mode_T;
2172	static const arch_register_req_t *in_reqs[] =
2173	{
2174		& sparc_requirements_gp_sp,
2175		& sparc_requirements_gp_gp,
2176		& sparc_requirements__none,
2177	};
2178
2179	/* construct in array */
2180	in[0] = stack;
2181	in[1] = size;
2182	in[2] = mem;
2183
2184	/* create node */
2185	assert(op != NULL);
2186	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2187
2188	/* init node attributes */
2189		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2190
2191	info = be_get_info(res);
2192	(void) info; /* avoid potential warning */
2193	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
2194	info->out_infos[1].req = &sparc_requirements_gp_gp;
2195	info->out_infos[2].req = &sparc_requirements__none;
2196
2197
2198	/* optimize node */
2199	res = optimize_node(res);
2200	irn_verify_irg(res, irg);
2201
2202	return res;
2203}
2204
2205/**
2206 * construct Add node
2207 */
2208ir_node *new_bd_sparc_Add_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
2209{
2210	ir_graph         *irg        = get_irn_irg(block);
2211	ir_op            *op         = op_sparc_Add;
2212	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2213	ir_node          *res;
2214	backend_info_t   *info;
2215	int             arity   = 1;
2216	ir_node        *in[1];
2217	int             n_res   = 1;
2218	ir_mode        *mode    = mode_Iu;
2219	static const arch_register_req_t *in_reqs[] =
2220	{
2221		& sparc_requirements_gp_gp,
2222	};
2223
2224	/* construct in array */
2225	in[0] = left;
2226
2227	/* flags */
2228	irn_flags_ |= arch_irn_flags_rematerializable;
2229
2230	/* create node */
2231	assert(op != NULL);
2232	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2233
2234	/* init node attributes */
2235		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2236	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2237	info = be_get_info(res);
2238	(void) info; /* avoid potential warning */
2239	info->out_infos[0].req = &sparc_requirements_gp_gp;
2240
2241
2242	/* optimize node */
2243	res = optimize_node(res);
2244	irn_verify_irg(res, irg);
2245
2246	return res;
2247}
2248
2249/**
2250 * construct Add node
2251 */
2252ir_node *new_bd_sparc_Add_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
2253{
2254	ir_graph         *irg        = get_irn_irg(block);
2255	ir_op            *op         = op_sparc_Add;
2256	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2257	ir_node          *res;
2258	backend_info_t   *info;
2259	int             arity   = 2;
2260	ir_node        *in[2];
2261	int             n_res   = 1;
2262	ir_mode        *mode    = mode_Iu;
2263	static const arch_register_req_t *in_reqs[] =
2264	{
2265		& sparc_requirements_gp_gp,
2266		& sparc_requirements_gp_gp,
2267	};
2268
2269	/* construct in array */
2270	in[0] = left;
2271	in[1] = right;
2272
2273	/* flags */
2274	irn_flags_ |= arch_irn_flags_rematerializable;
2275
2276	/* create node */
2277	assert(op != NULL);
2278	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2279
2280	/* init node attributes */
2281		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2282
2283	info = be_get_info(res);
2284	(void) info; /* avoid potential warning */
2285	info->out_infos[0].req = &sparc_requirements_gp_gp;
2286
2287
2288	/* optimize node */
2289	res = optimize_node(res);
2290	irn_verify_irg(res, irg);
2291
2292	return res;
2293}
2294
2295/**
2296 * construct SubCC node
2297 */
2298ir_node *new_bd_sparc_SubCC_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
2299{
2300	ir_graph         *irg        = get_irn_irg(block);
2301	ir_op            *op         = op_sparc_SubCC;
2302	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2303	ir_node          *res;
2304	backend_info_t   *info;
2305	int             arity   = 1;
2306	ir_node        *in[1];
2307	int             n_res   = 2;
2308	ir_mode        *mode    = mode_T;
2309	static const arch_register_req_t *in_reqs[] =
2310	{
2311		& sparc_requirements_gp_gp,
2312	};
2313
2314	/* construct in array */
2315	in[0] = left;
2316
2317	/* flags */
2318	irn_flags_ |= arch_irn_flags_rematerializable;
2319
2320	/* create node */
2321	assert(op != NULL);
2322	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2323
2324	/* init node attributes */
2325		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2326	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2327	info = be_get_info(res);
2328	(void) info; /* avoid potential warning */
2329	info->out_infos[0].req = &sparc_requirements_gp_gp;
2330	info->out_infos[1].req = &sparc_requirements_flags_class_flags;
2331
2332
2333	/* optimize node */
2334	res = optimize_node(res);
2335	irn_verify_irg(res, irg);
2336
2337	return res;
2338}
2339
2340/**
2341 * construct SubCC node
2342 */
2343ir_node *new_bd_sparc_SubCC_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
2344{
2345	ir_graph         *irg        = get_irn_irg(block);
2346	ir_op            *op         = op_sparc_SubCC;
2347	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2348	ir_node          *res;
2349	backend_info_t   *info;
2350	int             arity   = 2;
2351	ir_node        *in[2];
2352	int             n_res   = 2;
2353	ir_mode        *mode    = mode_T;
2354	static const arch_register_req_t *in_reqs[] =
2355	{
2356		& sparc_requirements_gp_gp,
2357		& sparc_requirements_gp_gp,
2358	};
2359
2360	/* construct in array */
2361	in[0] = left;
2362	in[1] = right;
2363
2364	/* flags */
2365	irn_flags_ |= arch_irn_flags_rematerializable;
2366
2367	/* create node */
2368	assert(op != NULL);
2369	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2370
2371	/* init node attributes */
2372		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2373
2374	info = be_get_info(res);
2375	(void) info; /* avoid potential warning */
2376	info->out_infos[0].req = &sparc_requirements_gp_gp;
2377	info->out_infos[1].req = &sparc_requirements_flags_class_flags;
2378
2379
2380	/* optimize node */
2381	res = optimize_node(res);
2382	irn_verify_irg(res, irg);
2383
2384	return res;
2385}
2386
2387/**
2388 * construct Ldf node
2389 */
2390ir_node *new_bd_sparc_Ldf_q(dbg_info *dbgi, ir_node *block, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
2391{
2392	ir_graph         *irg        = get_irn_irg(block);
2393	ir_op            *op         = op_sparc_Ldf;
2394	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2395	ir_node          *res;
2396	backend_info_t   *info;
2397	int             arity   = 2;
2398	ir_node        *in[2];
2399	int             n_res   = 2;
2400	ir_mode        *mode    = mode_T;
2401	static const arch_register_req_t *in_reqs[] =
2402	{
2403		& sparc_requirements_gp_gp,
2404		& sparc_requirements__none,
2405	};
2406
2407	/* construct in array */
2408	in[0] = ptr;
2409	in[1] = mem;
2410
2411	/* create node */
2412	assert(op != NULL);
2413	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2414
2415	/* init node attributes */
2416		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2417	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
2418	info = be_get_info(res);
2419	(void) info; /* avoid potential warning */
2420	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
2421	info->out_infos[1].req = &sparc_requirements__none;
2422
2423
2424	/* optimize node */
2425	res = optimize_node(res);
2426	irn_verify_irg(res, irg);
2427
2428	return res;
2429}
2430
2431/**
2432 * construct Ldf node
2433 */
2434ir_node *new_bd_sparc_Ldf_d(dbg_info *dbgi, ir_node *block, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
2435{
2436	ir_graph         *irg        = get_irn_irg(block);
2437	ir_op            *op         = op_sparc_Ldf;
2438	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2439	ir_node          *res;
2440	backend_info_t   *info;
2441	int             arity   = 2;
2442	ir_node        *in[2];
2443	int             n_res   = 2;
2444	ir_mode        *mode    = mode_T;
2445	static const arch_register_req_t *in_reqs[] =
2446	{
2447		& sparc_requirements_gp_gp,
2448		& sparc_requirements__none,
2449	};
2450
2451	/* construct in array */
2452	in[0] = ptr;
2453	in[1] = mem;
2454
2455	/* create node */
2456	assert(op != NULL);
2457	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2458
2459	/* init node attributes */
2460		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2461	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
2462	info = be_get_info(res);
2463	(void) info; /* avoid potential warning */
2464	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
2465	info->out_infos[1].req = &sparc_requirements__none;
2466
2467
2468	/* optimize node */
2469	res = optimize_node(res);
2470	irn_verify_irg(res, irg);
2471
2472	return res;
2473}
2474
2475/**
2476 * construct Ldf node
2477 */
2478ir_node *new_bd_sparc_Ldf_s(dbg_info *dbgi, ir_node *block, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
2479{
2480	ir_graph         *irg        = get_irn_irg(block);
2481	ir_op            *op         = op_sparc_Ldf;
2482	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2483	ir_node          *res;
2484	backend_info_t   *info;
2485	int             arity   = 2;
2486	ir_node        *in[2];
2487	int             n_res   = 2;
2488	ir_mode        *mode    = mode_T;
2489	static const arch_register_req_t *in_reqs[] =
2490	{
2491		& sparc_requirements_gp_gp,
2492		& sparc_requirements__none,
2493	};
2494
2495	/* construct in array */
2496	in[0] = ptr;
2497	in[1] = mem;
2498
2499	/* create node */
2500	assert(op != NULL);
2501	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2502
2503	/* init node attributes */
2504		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2505	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
2506	info = be_get_info(res);
2507	(void) info; /* avoid potential warning */
2508	info->out_infos[0].req = &sparc_requirements_fp_fp;
2509	info->out_infos[1].req = &sparc_requirements__none;
2510
2511
2512	/* optimize node */
2513	res = optimize_node(res);
2514	irn_verify_irg(res, irg);
2515
2516	return res;
2517}
2518
2519/**
2520 * construct fdiv node
2521 */
2522ir_node *new_bd_sparc_fdiv_q(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
2523{
2524	ir_graph         *irg        = get_irn_irg(block);
2525	ir_op            *op         = op_sparc_fdiv;
2526	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2527	ir_node          *res;
2528	backend_info_t   *info;
2529	int             arity   = 2;
2530	ir_node        *in[2];
2531	int             n_res   = 2;
2532	ir_mode        *mode    = mode_T;
2533	static const arch_register_req_t *in_reqs[] =
2534	{
2535		& sparc_requirements_fp_fp_a_4,
2536		& sparc_requirements_fp_fp_a_4,
2537	};
2538
2539	/* construct in array */
2540	in[0] = left;
2541	in[1] = right;
2542
2543	/* flags */
2544	irn_flags_ |= arch_irn_flags_rematerializable;
2545
2546	/* create node */
2547	assert(op != NULL);
2548	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2549
2550	/* init node attributes */
2551		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2552	init_sparc_fp_attributes(res, fp_mode);
2553
2554
2555	info = be_get_info(res);
2556	(void) info; /* avoid potential warning */
2557	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
2558	info->out_infos[1].req = &sparc_requirements__none;
2559
2560
2561	/* optimize node */
2562	res = optimize_node(res);
2563	irn_verify_irg(res, irg);
2564
2565	return res;
2566}
2567
2568/**
2569 * construct fdiv node
2570 */
2571ir_node *new_bd_sparc_fdiv_d(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
2572{
2573	ir_graph         *irg        = get_irn_irg(block);
2574	ir_op            *op         = op_sparc_fdiv;
2575	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2576	ir_node          *res;
2577	backend_info_t   *info;
2578	int             arity   = 2;
2579	ir_node        *in[2];
2580	int             n_res   = 2;
2581	ir_mode        *mode    = mode_T;
2582	static const arch_register_req_t *in_reqs[] =
2583	{
2584		& sparc_requirements_fp_fp_a_2,
2585		& sparc_requirements_fp_fp_a_2,
2586	};
2587
2588	/* construct in array */
2589	in[0] = left;
2590	in[1] = right;
2591
2592	/* flags */
2593	irn_flags_ |= arch_irn_flags_rematerializable;
2594
2595	/* create node */
2596	assert(op != NULL);
2597	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2598
2599	/* init node attributes */
2600		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2601	init_sparc_fp_attributes(res, fp_mode);
2602
2603
2604	info = be_get_info(res);
2605	(void) info; /* avoid potential warning */
2606	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
2607	info->out_infos[1].req = &sparc_requirements__none;
2608
2609
2610	/* optimize node */
2611	res = optimize_node(res);
2612	irn_verify_irg(res, irg);
2613
2614	return res;
2615}
2616
2617/**
2618 * construct fdiv node
2619 */
2620ir_node *new_bd_sparc_fdiv_s(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
2621{
2622	ir_graph         *irg        = get_irn_irg(block);
2623	ir_op            *op         = op_sparc_fdiv;
2624	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2625	ir_node          *res;
2626	backend_info_t   *info;
2627	int             arity   = 2;
2628	ir_node        *in[2];
2629	int             n_res   = 2;
2630	ir_mode        *mode    = mode_T;
2631	static const arch_register_req_t *in_reqs[] =
2632	{
2633		& sparc_requirements_fp_fp,
2634		& sparc_requirements_fp_fp,
2635	};
2636
2637	/* construct in array */
2638	in[0] = left;
2639	in[1] = right;
2640
2641	/* flags */
2642	irn_flags_ |= arch_irn_flags_rematerializable;
2643
2644	/* create node */
2645	assert(op != NULL);
2646	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2647
2648	/* init node attributes */
2649		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2650	init_sparc_fp_attributes(res, fp_mode);
2651
2652
2653	info = be_get_info(res);
2654	(void) info; /* avoid potential warning */
2655	info->out_infos[0].req = &sparc_requirements_fp_fp;
2656	info->out_infos[1].req = &sparc_requirements__none;
2657
2658
2659	/* optimize node */
2660	res = optimize_node(res);
2661	irn_verify_irg(res, irg);
2662
2663	return res;
2664}
2665
2666/**
2667 * construct AndN node
2668 */
2669ir_node *new_bd_sparc_AndN_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
2670{
2671	ir_graph         *irg        = get_irn_irg(block);
2672	ir_op            *op         = op_sparc_AndN;
2673	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2674	ir_node          *res;
2675	backend_info_t   *info;
2676	int             arity   = 1;
2677	ir_node        *in[1];
2678	int             n_res   = 1;
2679	ir_mode        *mode    = mode_Iu;
2680	static const arch_register_req_t *in_reqs[] =
2681	{
2682		& sparc_requirements_gp_gp,
2683	};
2684
2685	/* construct in array */
2686	in[0] = left;
2687
2688	/* flags */
2689	irn_flags_ |= arch_irn_flags_rematerializable;
2690
2691	/* create node */
2692	assert(op != NULL);
2693	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2694
2695	/* init node attributes */
2696		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2697	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2698	info = be_get_info(res);
2699	(void) info; /* avoid potential warning */
2700	info->out_infos[0].req = &sparc_requirements_gp_gp;
2701
2702
2703	/* optimize node */
2704	res = optimize_node(res);
2705	irn_verify_irg(res, irg);
2706
2707	return res;
2708}
2709
2710/**
2711 * construct AndN node
2712 */
2713ir_node *new_bd_sparc_AndN_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
2714{
2715	ir_graph         *irg        = get_irn_irg(block);
2716	ir_op            *op         = op_sparc_AndN;
2717	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2718	ir_node          *res;
2719	backend_info_t   *info;
2720	int             arity   = 2;
2721	ir_node        *in[2];
2722	int             n_res   = 1;
2723	ir_mode        *mode    = mode_Iu;
2724	static const arch_register_req_t *in_reqs[] =
2725	{
2726		& sparc_requirements_gp_gp,
2727		& sparc_requirements_gp_gp,
2728	};
2729
2730	/* construct in array */
2731	in[0] = left;
2732	in[1] = right;
2733
2734	/* flags */
2735	irn_flags_ |= arch_irn_flags_rematerializable;
2736
2737	/* create node */
2738	assert(op != NULL);
2739	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2740
2741	/* init node attributes */
2742		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2743
2744	info = be_get_info(res);
2745	(void) info; /* avoid potential warning */
2746	info->out_infos[0].req = &sparc_requirements_gp_gp;
2747
2748
2749	/* optimize node */
2750	res = optimize_node(res);
2751	irn_verify_irg(res, irg);
2752
2753	return res;
2754}
2755
2756/**
2757 * construct fftoi node
2758 */
2759ir_node *new_bd_sparc_fftoi_q(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
2760{
2761	ir_graph         *irg        = get_irn_irg(block);
2762	ir_op            *op         = op_sparc_fftoi;
2763	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2764	ir_node          *res;
2765	backend_info_t   *info;
2766	int             arity   = 1;
2767	ir_node        *in[1];
2768	int             n_res   = 1;
2769	ir_mode        *mode    = mode_Iu;
2770	static const arch_register_req_t *in_reqs[] =
2771	{
2772		& sparc_requirements_fp_fp_a_4,
2773	};
2774
2775	/* construct in array */
2776	in[0] = op0;
2777
2778	/* flags */
2779	irn_flags_ |= arch_irn_flags_rematerializable;
2780
2781	/* create node */
2782	assert(op != NULL);
2783	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2784
2785	/* init node attributes */
2786		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2787	init_sparc_fp_attributes(res, fp_mode);
2788
2789
2790	info = be_get_info(res);
2791	(void) info; /* avoid potential warning */
2792	info->out_infos[0].req = &sparc_requirements_fp_fp;
2793
2794
2795	/* optimize node */
2796	res = optimize_node(res);
2797	irn_verify_irg(res, irg);
2798
2799	return res;
2800}
2801
2802/**
2803 * construct fftoi node
2804 */
2805ir_node *new_bd_sparc_fftoi_d(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
2806{
2807	ir_graph         *irg        = get_irn_irg(block);
2808	ir_op            *op         = op_sparc_fftoi;
2809	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2810	ir_node          *res;
2811	backend_info_t   *info;
2812	int             arity   = 1;
2813	ir_node        *in[1];
2814	int             n_res   = 1;
2815	ir_mode        *mode    = mode_Iu;
2816	static const arch_register_req_t *in_reqs[] =
2817	{
2818		& sparc_requirements_fp_fp_a_2,
2819	};
2820
2821	/* construct in array */
2822	in[0] = op0;
2823
2824	/* flags */
2825	irn_flags_ |= arch_irn_flags_rematerializable;
2826
2827	/* create node */
2828	assert(op != NULL);
2829	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2830
2831	/* init node attributes */
2832		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2833	init_sparc_fp_attributes(res, fp_mode);
2834
2835
2836	info = be_get_info(res);
2837	(void) info; /* avoid potential warning */
2838	info->out_infos[0].req = &sparc_requirements_fp_fp;
2839
2840
2841	/* optimize node */
2842	res = optimize_node(res);
2843	irn_verify_irg(res, irg);
2844
2845	return res;
2846}
2847
2848/**
2849 * construct fftoi node
2850 */
2851ir_node *new_bd_sparc_fftoi_s(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_mode *fp_mode)
2852{
2853	ir_graph         *irg        = get_irn_irg(block);
2854	ir_op            *op         = op_sparc_fftoi;
2855	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2856	ir_node          *res;
2857	backend_info_t   *info;
2858	int             arity   = 1;
2859	ir_node        *in[1];
2860	int             n_res   = 1;
2861	ir_mode        *mode    = mode_Iu;
2862	static const arch_register_req_t *in_reqs[] =
2863	{
2864		& sparc_requirements_fp_fp,
2865	};
2866
2867	/* construct in array */
2868	in[0] = op0;
2869
2870	/* flags */
2871	irn_flags_ |= arch_irn_flags_rematerializable;
2872
2873	/* create node */
2874	assert(op != NULL);
2875	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2876
2877	/* init node attributes */
2878		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2879	init_sparc_fp_attributes(res, fp_mode);
2880
2881
2882	info = be_get_info(res);
2883	(void) info; /* avoid potential warning */
2884	info->out_infos[0].req = &sparc_requirements_fp_fp;
2885
2886
2887	/* optimize node */
2888	res = optimize_node(res);
2889	irn_verify_irg(res, irg);
2890
2891	return res;
2892}
2893
2894/**
2895 * construct XorCCZero node
2896 */
2897ir_node *new_bd_sparc_XorCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
2898{
2899	ir_graph         *irg        = get_irn_irg(block);
2900	ir_op            *op         = op_sparc_XorCCZero;
2901	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2902	ir_node          *res;
2903	backend_info_t   *info;
2904	int             arity   = 1;
2905	ir_node        *in[1];
2906	int             n_res   = 1;
2907	ir_mode        *mode    = mode_Bu;
2908	static const arch_register_req_t *in_reqs[] =
2909	{
2910		& sparc_requirements_gp_gp,
2911	};
2912
2913	/* construct in array */
2914	in[0] = left;
2915
2916	/* flags */
2917	irn_flags_ |= arch_irn_flags_rematerializable;
2918
2919	/* create node */
2920	assert(op != NULL);
2921	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2922
2923	/* init node attributes */
2924		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2925	sparc_set_attr_imm(res, immediate_entity, immediate_value);
2926	info = be_get_info(res);
2927	(void) info; /* avoid potential warning */
2928	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
2929
2930
2931	/* optimize node */
2932	res = optimize_node(res);
2933	irn_verify_irg(res, irg);
2934
2935	return res;
2936}
2937
2938/**
2939 * construct XorCCZero node
2940 */
2941ir_node *new_bd_sparc_XorCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
2942{
2943	ir_graph         *irg        = get_irn_irg(block);
2944	ir_op            *op         = op_sparc_XorCCZero;
2945	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2946	ir_node          *res;
2947	backend_info_t   *info;
2948	int             arity   = 2;
2949	ir_node        *in[2];
2950	int             n_res   = 1;
2951	ir_mode        *mode    = mode_Bu;
2952	static const arch_register_req_t *in_reqs[] =
2953	{
2954		& sparc_requirements_gp_gp,
2955		& sparc_requirements_gp_gp,
2956	};
2957
2958	/* construct in array */
2959	in[0] = left;
2960	in[1] = right;
2961
2962	/* flags */
2963	irn_flags_ |= arch_irn_flags_rematerializable;
2964
2965	/* create node */
2966	assert(op != NULL);
2967	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
2968
2969	/* init node attributes */
2970		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
2971
2972	info = be_get_info(res);
2973	(void) info; /* avoid potential warning */
2974	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
2975
2976
2977	/* optimize node */
2978	res = optimize_node(res);
2979	irn_verify_irg(res, irg);
2980
2981	return res;
2982}
2983
2984/**
2985 * construct St node
2986 */
2987ir_node *new_bd_sparc_St_imm(dbg_info *dbgi, ir_node *block, ir_node *val, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
2988{
2989	ir_graph         *irg        = get_irn_irg(block);
2990	ir_op            *op         = op_sparc_St;
2991	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
2992	ir_node          *res;
2993	backend_info_t   *info;
2994	int             arity   = 3;
2995	ir_node        *in[3];
2996	int             n_res   = 1;
2997	ir_mode        *mode    = mode_M;
2998	static const arch_register_req_t *in_reqs[] =
2999	{
3000		& sparc_requirements_gp_gp,
3001		& sparc_requirements_gp_gp,
3002		& sparc_requirements__none,
3003	};
3004
3005	/* construct in array */
3006	in[0] = val;
3007	in[1] = ptr;
3008	in[2] = mem;
3009
3010	/* create node */
3011	assert(op != NULL);
3012	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3013
3014	/* init node attributes */
3015		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3016	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
3017	info = be_get_info(res);
3018	(void) info; /* avoid potential warning */
3019	info->out_infos[0].req = &sparc_requirements__none;
3020
3021
3022	/* optimize node */
3023	res = optimize_node(res);
3024	irn_verify_irg(res, irg);
3025
3026	return res;
3027}
3028
3029/**
3030 * construct St node
3031 */
3032ir_node *new_bd_sparc_St_reg(dbg_info *dbgi, ir_node *block, ir_node *val, ir_node *ptr, ir_node *ptr2, ir_node *mem, ir_mode *ls_mode)
3033{
3034	ir_graph         *irg        = get_irn_irg(block);
3035	ir_op            *op         = op_sparc_St;
3036	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3037	ir_node          *res;
3038	backend_info_t   *info;
3039	int             arity   = 4;
3040	ir_node        *in[4];
3041	int             n_res   = 1;
3042	ir_mode        *mode    = mode_M;
3043	static const arch_register_req_t *in_reqs[] =
3044	{
3045		& sparc_requirements_gp_gp,
3046		& sparc_requirements_gp_gp,
3047		& sparc_requirements_gp_gp,
3048		& sparc_requirements__none,
3049	};
3050
3051	/* construct in array */
3052	in[0] = val;
3053	in[1] = ptr;
3054	in[2] = ptr2;
3055	in[3] = mem;
3056
3057	/* create node */
3058	assert(op != NULL);
3059	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3060
3061	/* init node attributes */
3062		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3063	init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);
3064	info = be_get_info(res);
3065	(void) info; /* avoid potential warning */
3066	info->out_infos[0].req = &sparc_requirements__none;
3067
3068
3069	/* optimize node */
3070	res = optimize_node(res);
3071	irn_verify_irg(res, irg);
3072
3073	return res;
3074}
3075
3076/**
3077 * construct MulCCZero node
3078 */
3079ir_node *new_bd_sparc_MulCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
3080{
3081	ir_graph         *irg        = get_irn_irg(block);
3082	ir_op            *op         = op_sparc_MulCCZero;
3083	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3084	ir_node          *res;
3085	backend_info_t   *info;
3086	int             arity   = 1;
3087	ir_node        *in[1];
3088	int             n_res   = 1;
3089	ir_mode        *mode    = mode_Bu;
3090	static const arch_register_req_t *in_reqs[] =
3091	{
3092		& sparc_requirements_gp_gp,
3093	};
3094
3095	/* construct in array */
3096	in[0] = left;
3097
3098	/* flags */
3099	irn_flags_ |= arch_irn_flags_rematerializable;
3100
3101	/* create node */
3102	assert(op != NULL);
3103	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3104
3105	/* init node attributes */
3106		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3107	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3108	info = be_get_info(res);
3109	(void) info; /* avoid potential warning */
3110	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
3111
3112
3113	/* optimize node */
3114	res = optimize_node(res);
3115	irn_verify_irg(res, irg);
3116
3117	return res;
3118}
3119
3120/**
3121 * construct MulCCZero node
3122 */
3123ir_node *new_bd_sparc_MulCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
3124{
3125	ir_graph         *irg        = get_irn_irg(block);
3126	ir_op            *op         = op_sparc_MulCCZero;
3127	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3128	ir_node          *res;
3129	backend_info_t   *info;
3130	int             arity   = 2;
3131	ir_node        *in[2];
3132	int             n_res   = 1;
3133	ir_mode        *mode    = mode_Bu;
3134	static const arch_register_req_t *in_reqs[] =
3135	{
3136		& sparc_requirements_gp_gp,
3137		& sparc_requirements_gp_gp,
3138	};
3139
3140	/* construct in array */
3141	in[0] = left;
3142	in[1] = right;
3143
3144	/* flags */
3145	irn_flags_ |= arch_irn_flags_rematerializable;
3146
3147	/* create node */
3148	assert(op != NULL);
3149	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3150
3151	/* init node attributes */
3152		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3153
3154	info = be_get_info(res);
3155	(void) info; /* avoid potential warning */
3156	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
3157
3158
3159	/* optimize node */
3160	res = optimize_node(res);
3161	irn_verify_irg(res, irg);
3162
3163	return res;
3164}
3165
3166/**
3167 * construct Save node
3168 */
3169ir_node *new_bd_sparc_Save_imm(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_entity *immediate_entity, int32_t immediate_value)
3170{
3171	ir_graph         *irg        = get_irn_irg(block);
3172	ir_op            *op         = op_sparc_Save;
3173	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3174	ir_node          *res;
3175	backend_info_t   *info;
3176	int             arity   = 1;
3177	ir_node        *in[1];
3178	int             n_res   = 1;
3179	ir_mode        *mode    = mode_Iu;
3180	static const arch_register_req_t *in_reqs[] =
3181	{
3182		& sparc_requirements_gp_sp,
3183	};
3184
3185	/* construct in array */
3186	in[0] = stack;
3187
3188	/* create node */
3189	assert(op != NULL);
3190	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3191
3192	/* init node attributes */
3193		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3194	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3195	info = be_get_info(res);
3196	(void) info; /* avoid potential warning */
3197	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
3198
3199
3200	/* optimize node */
3201	res = optimize_node(res);
3202	irn_verify_irg(res, irg);
3203
3204	return res;
3205}
3206
3207/**
3208 * construct Save node
3209 */
3210ir_node *new_bd_sparc_Save_reg(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *increment)
3211{
3212	ir_graph         *irg        = get_irn_irg(block);
3213	ir_op            *op         = op_sparc_Save;
3214	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3215	ir_node          *res;
3216	backend_info_t   *info;
3217	int             arity   = 2;
3218	ir_node        *in[2];
3219	int             n_res   = 1;
3220	ir_mode        *mode    = mode_Iu;
3221	static const arch_register_req_t *in_reqs[] =
3222	{
3223		& sparc_requirements_gp_sp,
3224		& sparc_requirements_gp_gp,
3225	};
3226
3227	/* construct in array */
3228	in[0] = stack;
3229	in[1] = increment;
3230
3231	/* create node */
3232	assert(op != NULL);
3233	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3234
3235	/* init node attributes */
3236		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3237
3238	info = be_get_info(res);
3239	(void) info; /* avoid potential warning */
3240	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
3241
3242
3243	/* optimize node */
3244	res = optimize_node(res);
3245	irn_verify_irg(res, irg);
3246
3247	return res;
3248}
3249
3250/**
3251 * construct fbfcc node
3252 */
3253ir_node *new_bd_sparc_fbfcc(dbg_info *dbgi, ir_node *block, ir_node *flags, ir_relation relation)
3254{
3255	ir_graph         *irg        = get_irn_irg(block);
3256	ir_op            *op         = op_sparc_fbfcc;
3257	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3258	ir_node          *res;
3259	backend_info_t   *info;
3260	int             arity   = 1;
3261	ir_node        *in[1];
3262	int             n_res   = 2;
3263	ir_mode        *mode    = mode_T;
3264	static const arch_register_req_t *in_reqs[] =
3265	{
3266		& sparc_requirements_fpflags_class_fpflags,
3267	};
3268	sparc_jmp_cond_attr_t *attr;
3269
3270	/* construct in array */
3271	in[0] = flags;
3272
3273	/* flags */
3274	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
3275
3276	/* create node */
3277	assert(op != NULL);
3278	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3279
3280	/* init node attributes */
3281		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3282
3283	info = be_get_info(res);
3284	(void) info; /* avoid potential warning */
3285	info->out_infos[0].req = &sparc_requirements__none;
3286	info->out_infos[1].req = &sparc_requirements__none;
3287
3288
3289	attr = (sparc_jmp_cond_attr_t*)get_irn_generic_attr(res);
3290	(void) attr; /* avoid potential warning */
3291		init_sparc_jmp_cond_attr(res, relation, false);
3292	/* optimize node */
3293	res = optimize_node(res);
3294	irn_verify_irg(res, irg);
3295
3296	return res;
3297}
3298
3299/**
3300 * construct Sub node
3301 */
3302ir_node *new_bd_sparc_Sub_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
3303{
3304	ir_graph         *irg        = get_irn_irg(block);
3305	ir_op            *op         = op_sparc_Sub;
3306	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3307	ir_node          *res;
3308	backend_info_t   *info;
3309	int             arity   = 1;
3310	ir_node        *in[1];
3311	int             n_res   = 1;
3312	ir_mode        *mode    = mode_Iu;
3313	static const arch_register_req_t *in_reqs[] =
3314	{
3315		& sparc_requirements_gp_gp,
3316	};
3317
3318	/* construct in array */
3319	in[0] = left;
3320
3321	/* flags */
3322	irn_flags_ |= arch_irn_flags_rematerializable;
3323
3324	/* create node */
3325	assert(op != NULL);
3326	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3327
3328	/* init node attributes */
3329		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3330	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3331	info = be_get_info(res);
3332	(void) info; /* avoid potential warning */
3333	info->out_infos[0].req = &sparc_requirements_gp_gp;
3334
3335
3336	/* optimize node */
3337	res = optimize_node(res);
3338	irn_verify_irg(res, irg);
3339
3340	return res;
3341}
3342
3343/**
3344 * construct Sub node
3345 */
3346ir_node *new_bd_sparc_Sub_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
3347{
3348	ir_graph         *irg        = get_irn_irg(block);
3349	ir_op            *op         = op_sparc_Sub;
3350	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3351	ir_node          *res;
3352	backend_info_t   *info;
3353	int             arity   = 2;
3354	ir_node        *in[2];
3355	int             n_res   = 1;
3356	ir_mode        *mode    = mode_Iu;
3357	static const arch_register_req_t *in_reqs[] =
3358	{
3359		& sparc_requirements_gp_gp,
3360		& sparc_requirements_gp_gp,
3361	};
3362
3363	/* construct in array */
3364	in[0] = left;
3365	in[1] = right;
3366
3367	/* flags */
3368	irn_flags_ |= arch_irn_flags_rematerializable;
3369
3370	/* create node */
3371	assert(op != NULL);
3372	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3373
3374	/* init node attributes */
3375		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3376
3377	info = be_get_info(res);
3378	(void) info; /* avoid potential warning */
3379	info->out_infos[0].req = &sparc_requirements_gp_gp;
3380
3381
3382	/* optimize node */
3383	res = optimize_node(res);
3384	irn_verify_irg(res, irg);
3385
3386	return res;
3387}
3388
3389/**
3390 * construct Mul node
3391 */
3392ir_node *new_bd_sparc_Mul_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
3393{
3394	ir_graph         *irg        = get_irn_irg(block);
3395	ir_op            *op         = op_sparc_Mul;
3396	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3397	ir_node          *res;
3398	backend_info_t   *info;
3399	int             arity   = 1;
3400	ir_node        *in[1];
3401	int             n_res   = 1;
3402	ir_mode        *mode    = mode_Iu;
3403	static const arch_register_req_t *in_reqs[] =
3404	{
3405		& sparc_requirements_gp_gp,
3406	};
3407
3408	/* construct in array */
3409	in[0] = left;
3410
3411	/* flags */
3412	irn_flags_ |= arch_irn_flags_rematerializable;
3413
3414	/* create node */
3415	assert(op != NULL);
3416	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3417
3418	/* init node attributes */
3419		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3420	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3421	info = be_get_info(res);
3422	(void) info; /* avoid potential warning */
3423	info->out_infos[0].req = &sparc_requirements_gp_gp;
3424
3425
3426	/* optimize node */
3427	res = optimize_node(res);
3428	irn_verify_irg(res, irg);
3429
3430	return res;
3431}
3432
3433/**
3434 * construct Mul node
3435 */
3436ir_node *new_bd_sparc_Mul_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
3437{
3438	ir_graph         *irg        = get_irn_irg(block);
3439	ir_op            *op         = op_sparc_Mul;
3440	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3441	ir_node          *res;
3442	backend_info_t   *info;
3443	int             arity   = 2;
3444	ir_node        *in[2];
3445	int             n_res   = 1;
3446	ir_mode        *mode    = mode_Iu;
3447	static const arch_register_req_t *in_reqs[] =
3448	{
3449		& sparc_requirements_gp_gp,
3450		& sparc_requirements_gp_gp,
3451	};
3452
3453	/* construct in array */
3454	in[0] = left;
3455	in[1] = right;
3456
3457	/* flags */
3458	irn_flags_ |= arch_irn_flags_rematerializable;
3459
3460	/* create node */
3461	assert(op != NULL);
3462	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3463
3464	/* init node attributes */
3465		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3466
3467	info = be_get_info(res);
3468	(void) info; /* avoid potential warning */
3469	info->out_infos[0].req = &sparc_requirements_gp_gp;
3470
3471
3472	/* optimize node */
3473	res = optimize_node(res);
3474	irn_verify_irg(res, irg);
3475
3476	return res;
3477}
3478
3479/**
3480 * construct SubCC_t node
3481 */
3482ir_node *new_bd_sparc_SubCC_t(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
3483{
3484	ir_graph         *irg        = get_irn_irg(block);
3485	ir_op            *op         = op_sparc_SubCC_t;
3486	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3487	ir_node          *res;
3488	backend_info_t   *info;
3489	int             arity   = 2;
3490	ir_node        *in[2];
3491	int             n_res   = 2;
3492	ir_mode        *mode    = mode_T;
3493	static const arch_register_req_t **in_reqs = NULL;
3494
3495	/* construct in array */
3496	in[0] = left;
3497	in[1] = right;
3498
3499	/* create node */
3500	assert(op != NULL);
3501	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3502
3503	/* init node attributes */
3504	(void)in;(void)irn_flags_;(void)in_reqs;(void)n_res;
3505
3506	info = be_get_info(res);
3507	(void) info; /* avoid potential warning */
3508
3509
3510	/* optimize node */
3511	res = optimize_node(res);
3512	irn_verify_irg(res, irg);
3513
3514	return res;
3515}
3516
3517/**
3518 * construct Stf node
3519 */
3520ir_node *new_bd_sparc_Stf_q(dbg_info *dbgi, ir_node *block, ir_node *val, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
3521{
3522	ir_graph         *irg        = get_irn_irg(block);
3523	ir_op            *op         = op_sparc_Stf;
3524	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3525	ir_node          *res;
3526	backend_info_t   *info;
3527	int             arity   = 3;
3528	ir_node        *in[3];
3529	int             n_res   = 1;
3530	ir_mode        *mode    = mode_M;
3531	static const arch_register_req_t *in_reqs[] =
3532	{
3533		& sparc_requirements_fp_fp_a_4,
3534		& sparc_requirements_gp_gp,
3535		& sparc_requirements__none,
3536	};
3537
3538	/* construct in array */
3539	in[0] = val;
3540	in[1] = ptr;
3541	in[2] = mem;
3542
3543	/* create node */
3544	assert(op != NULL);
3545	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3546
3547	/* init node attributes */
3548		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3549	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
3550	info = be_get_info(res);
3551	(void) info; /* avoid potential warning */
3552	info->out_infos[0].req = &sparc_requirements__none;
3553
3554
3555	/* optimize node */
3556	res = optimize_node(res);
3557	irn_verify_irg(res, irg);
3558
3559	return res;
3560}
3561
3562/**
3563 * construct Stf node
3564 */
3565ir_node *new_bd_sparc_Stf_d(dbg_info *dbgi, ir_node *block, ir_node *val, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
3566{
3567	ir_graph         *irg        = get_irn_irg(block);
3568	ir_op            *op         = op_sparc_Stf;
3569	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3570	ir_node          *res;
3571	backend_info_t   *info;
3572	int             arity   = 3;
3573	ir_node        *in[3];
3574	int             n_res   = 1;
3575	ir_mode        *mode    = mode_M;
3576	static const arch_register_req_t *in_reqs[] =
3577	{
3578		& sparc_requirements_fp_fp_a_2,
3579		& sparc_requirements_gp_gp,
3580		& sparc_requirements__none,
3581	};
3582
3583	/* construct in array */
3584	in[0] = val;
3585	in[1] = ptr;
3586	in[2] = mem;
3587
3588	/* create node */
3589	assert(op != NULL);
3590	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3591
3592	/* init node attributes */
3593		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3594	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
3595	info = be_get_info(res);
3596	(void) info; /* avoid potential warning */
3597	info->out_infos[0].req = &sparc_requirements__none;
3598
3599
3600	/* optimize node */
3601	res = optimize_node(res);
3602	irn_verify_irg(res, irg);
3603
3604	return res;
3605}
3606
3607/**
3608 * construct Stf node
3609 */
3610ir_node *new_bd_sparc_Stf_s(dbg_info *dbgi, ir_node *block, ir_node *val, ir_node *ptr, ir_node *mem, ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity)
3611{
3612	ir_graph         *irg        = get_irn_irg(block);
3613	ir_op            *op         = op_sparc_Stf;
3614	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3615	ir_node          *res;
3616	backend_info_t   *info;
3617	int             arity   = 3;
3618	ir_node        *in[3];
3619	int             n_res   = 1;
3620	ir_mode        *mode    = mode_M;
3621	static const arch_register_req_t *in_reqs[] =
3622	{
3623		& sparc_requirements_fp_fp,
3624		& sparc_requirements_gp_gp,
3625		& sparc_requirements__none,
3626	};
3627
3628	/* construct in array */
3629	in[0] = val;
3630	in[1] = ptr;
3631	in[2] = mem;
3632
3633	/* create node */
3634	assert(op != NULL);
3635	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3636
3637	/* init node attributes */
3638		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3639	init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);
3640	info = be_get_info(res);
3641	(void) info; /* avoid potential warning */
3642	info->out_infos[0].req = &sparc_requirements__none;
3643
3644
3645	/* optimize node */
3646	res = optimize_node(res);
3647	irn_verify_irg(res, irg);
3648
3649	return res;
3650}
3651
3652/**
3653 * construct SDiv node
3654 */
3655ir_node *new_bd_sparc_SDiv_imm(dbg_info *dbgi, ir_node *block, ir_node *dividend_high, ir_node *dividend_low, ir_entity *immediate_entity, int32_t immediate_value)
3656{
3657	ir_graph         *irg        = get_irn_irg(block);
3658	ir_op            *op         = op_sparc_SDiv;
3659	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3660	ir_node          *res;
3661	backend_info_t   *info;
3662	int             arity   = 2;
3663	ir_node        *in[2];
3664	int             n_res   = 1;
3665	ir_mode        *mode    = mode_T;
3666	static const arch_register_req_t *in_reqs[] =
3667	{
3668		& sparc_requirements_gp_gp,
3669		& sparc_requirements_gp_gp,
3670	};
3671
3672	/* construct in array */
3673	in[0] = dividend_high;
3674	in[1] = dividend_low;
3675
3676	/* flags */
3677	irn_flags_ |= arch_irn_flags_rematerializable;
3678	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
3679
3680	/* create node */
3681	assert(op != NULL);
3682	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3683
3684	/* init node attributes */
3685		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3686	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3687	info = be_get_info(res);
3688	(void) info; /* avoid potential warning */
3689	info->out_infos[0].req = &sparc_requirements_gp_gp;
3690
3691
3692	/* optimize node */
3693	res = optimize_node(res);
3694	irn_verify_irg(res, irg);
3695
3696	return res;
3697}
3698
3699/**
3700 * construct SDiv node
3701 */
3702ir_node *new_bd_sparc_SDiv_reg(dbg_info *dbgi, ir_node *block, ir_node *dividend_high, ir_node *dividend_low, ir_node *divisor)
3703{
3704	ir_graph         *irg        = get_irn_irg(block);
3705	ir_op            *op         = op_sparc_SDiv;
3706	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3707	ir_node          *res;
3708	backend_info_t   *info;
3709	int             arity   = 3;
3710	ir_node        *in[3];
3711	int             n_res   = 1;
3712	ir_mode        *mode    = mode_T;
3713	static const arch_register_req_t *in_reqs[] =
3714	{
3715		& sparc_requirements_gp_gp,
3716		& sparc_requirements_gp_gp,
3717		& sparc_requirements_gp_gp,
3718	};
3719
3720	/* construct in array */
3721	in[0] = dividend_high;
3722	in[1] = dividend_low;
3723	in[2] = divisor;
3724
3725	/* flags */
3726	irn_flags_ |= arch_irn_flags_rematerializable;
3727	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
3728
3729	/* create node */
3730	assert(op != NULL);
3731	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3732
3733	/* init node attributes */
3734		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3735
3736	info = be_get_info(res);
3737	(void) info; /* avoid potential warning */
3738	info->out_infos[0].req = &sparc_requirements_gp_gp;
3739
3740
3741	/* optimize node */
3742	res = optimize_node(res);
3743	irn_verify_irg(res, irg);
3744
3745	return res;
3746}
3747
3748/**
3749 * construct AddX_t node
3750 */
3751ir_node *new_bd_sparc_AddX_t(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_node *flags_input, ir_mode *mode)
3752{
3753	ir_graph         *irg        = get_irn_irg(block);
3754	ir_op            *op         = op_sparc_AddX_t;
3755	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3756	ir_node          *res;
3757	backend_info_t   *info;
3758	int             arity   = 3;
3759	ir_node        *in[3];
3760	int             n_res   = 0;
3761	static const arch_register_req_t **in_reqs = NULL;
3762
3763	/* construct in array */
3764	in[0] = left;
3765	in[1] = right;
3766	in[2] = flags_input;
3767
3768	/* create node */
3769	assert(op != NULL);
3770	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3771
3772	/* init node attributes */
3773	(void)in;(void)irn_flags_;(void)in_reqs;(void)n_res;
3774
3775	info = be_get_info(res);
3776	(void) info; /* avoid potential warning */
3777
3778
3779	/* optimize node */
3780	res = optimize_node(res);
3781	irn_verify_irg(res, irg);
3782
3783	return res;
3784}
3785
3786/**
3787 * construct fabs node
3788 */
3789ir_node *new_bd_sparc_fabs_q(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
3790{
3791	ir_graph         *irg        = get_irn_irg(block);
3792	ir_op            *op         = op_sparc_fabs;
3793	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3794	ir_node          *res;
3795	backend_info_t   *info;
3796	int             arity   = 1;
3797	ir_node        *in[1];
3798	int             n_res   = 1;
3799	ir_mode        *mode    = mode_Q;
3800	static const arch_register_req_t *in_reqs[] =
3801	{
3802		& sparc_requirements_fp_fp_a_4,
3803	};
3804
3805	/* construct in array */
3806	in[0] = val;
3807
3808	/* flags */
3809	irn_flags_ |= arch_irn_flags_rematerializable;
3810
3811	/* create node */
3812	assert(op != NULL);
3813	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3814
3815	/* init node attributes */
3816		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3817	init_sparc_fp_attributes(res, fp_mode);
3818
3819
3820	info = be_get_info(res);
3821	(void) info; /* avoid potential warning */
3822	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
3823
3824
3825	/* optimize node */
3826	res = optimize_node(res);
3827	irn_verify_irg(res, irg);
3828
3829	return res;
3830}
3831
3832/**
3833 * construct fabs node
3834 */
3835ir_node *new_bd_sparc_fabs_d(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
3836{
3837	ir_graph         *irg        = get_irn_irg(block);
3838	ir_op            *op         = op_sparc_fabs;
3839	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3840	ir_node          *res;
3841	backend_info_t   *info;
3842	int             arity   = 1;
3843	ir_node        *in[1];
3844	int             n_res   = 1;
3845	ir_mode        *mode    = mode_D;
3846	static const arch_register_req_t *in_reqs[] =
3847	{
3848		& sparc_requirements_fp_fp_a_2,
3849	};
3850
3851	/* construct in array */
3852	in[0] = val;
3853
3854	/* flags */
3855	irn_flags_ |= arch_irn_flags_rematerializable;
3856
3857	/* create node */
3858	assert(op != NULL);
3859	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3860
3861	/* init node attributes */
3862		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3863	init_sparc_fp_attributes(res, fp_mode);
3864
3865
3866	info = be_get_info(res);
3867	(void) info; /* avoid potential warning */
3868	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
3869
3870
3871	/* optimize node */
3872	res = optimize_node(res);
3873	irn_verify_irg(res, irg);
3874
3875	return res;
3876}
3877
3878/**
3879 * construct fabs node
3880 */
3881ir_node *new_bd_sparc_fabs_s(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
3882{
3883	ir_graph         *irg        = get_irn_irg(block);
3884	ir_op            *op         = op_sparc_fabs;
3885	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3886	ir_node          *res;
3887	backend_info_t   *info;
3888	int             arity   = 1;
3889	ir_node        *in[1];
3890	int             n_res   = 1;
3891	ir_mode        *mode    = mode_F;
3892	static const arch_register_req_t *in_reqs[] =
3893	{
3894		& sparc_requirements_fp_fp,
3895	};
3896
3897	/* construct in array */
3898	in[0] = val;
3899
3900	/* flags */
3901	irn_flags_ |= arch_irn_flags_rematerializable;
3902
3903	/* create node */
3904	assert(op != NULL);
3905	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3906
3907	/* init node attributes */
3908		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3909	init_sparc_fp_attributes(res, fp_mode);
3910
3911
3912	info = be_get_info(res);
3913	(void) info; /* avoid potential warning */
3914	info->out_infos[0].req = &sparc_requirements_fp_fp;
3915
3916
3917	/* optimize node */
3918	res = optimize_node(res);
3919	irn_verify_irg(res, irg);
3920
3921	return res;
3922}
3923
3924/**
3925 * construct AddCC node
3926 */
3927ir_node *new_bd_sparc_AddCC_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
3928{
3929	ir_graph         *irg        = get_irn_irg(block);
3930	ir_op            *op         = op_sparc_AddCC;
3931	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3932	ir_node          *res;
3933	backend_info_t   *info;
3934	int             arity   = 1;
3935	ir_node        *in[1];
3936	int             n_res   = 2;
3937	ir_mode        *mode    = mode_T;
3938	static const arch_register_req_t *in_reqs[] =
3939	{
3940		& sparc_requirements_gp_gp,
3941	};
3942
3943	/* construct in array */
3944	in[0] = left;
3945
3946	/* flags */
3947	irn_flags_ |= arch_irn_flags_rematerializable;
3948
3949	/* create node */
3950	assert(op != NULL);
3951	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3952
3953	/* init node attributes */
3954		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
3955	sparc_set_attr_imm(res, immediate_entity, immediate_value);
3956	info = be_get_info(res);
3957	(void) info; /* avoid potential warning */
3958	info->out_infos[0].req = &sparc_requirements_gp_gp;
3959	info->out_infos[1].req = &sparc_requirements_flags_class_flags;
3960
3961
3962	/* optimize node */
3963	res = optimize_node(res);
3964	irn_verify_irg(res, irg);
3965
3966	return res;
3967}
3968
3969/**
3970 * construct AddCC node
3971 */
3972ir_node *new_bd_sparc_AddCC_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
3973{
3974	ir_graph         *irg        = get_irn_irg(block);
3975	ir_op            *op         = op_sparc_AddCC;
3976	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
3977	ir_node          *res;
3978	backend_info_t   *info;
3979	int             arity   = 2;
3980	ir_node        *in[2];
3981	int             n_res   = 2;
3982	ir_mode        *mode    = mode_T;
3983	static const arch_register_req_t *in_reqs[] =
3984	{
3985		& sparc_requirements_gp_gp,
3986		& sparc_requirements_gp_gp,
3987	};
3988
3989	/* construct in array */
3990	in[0] = left;
3991	in[1] = right;
3992
3993	/* flags */
3994	irn_flags_ |= arch_irn_flags_rematerializable;
3995
3996	/* create node */
3997	assert(op != NULL);
3998	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
3999
4000	/* init node attributes */
4001		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4002
4003	info = be_get_info(res);
4004	(void) info; /* avoid potential warning */
4005	info->out_infos[0].req = &sparc_requirements_gp_gp;
4006	info->out_infos[1].req = &sparc_requirements_flags_class_flags;
4007
4008
4009	/* optimize node */
4010	res = optimize_node(res);
4011	irn_verify_irg(res, irg);
4012
4013	return res;
4014}
4015
4016/**
4017 * construct Bicc node
4018 */
4019ir_node *new_bd_sparc_Bicc(dbg_info *dbgi, ir_node *block, ir_node *flags, ir_relation relation, bool is_unsigned)
4020{
4021	ir_graph         *irg        = get_irn_irg(block);
4022	ir_op            *op         = op_sparc_Bicc;
4023	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4024	ir_node          *res;
4025	backend_info_t   *info;
4026	int             arity   = 1;
4027	ir_node        *in[1];
4028	int             n_res   = 2;
4029	ir_mode        *mode    = mode_T;
4030	static const arch_register_req_t *in_reqs[] =
4031	{
4032		& sparc_requirements_flags_class_flags,
4033	};
4034	sparc_jmp_cond_attr_t *attr;
4035
4036	/* construct in array */
4037	in[0] = flags;
4038
4039	/* flags */
4040	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
4041
4042	/* create node */
4043	assert(op != NULL);
4044	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4045
4046	/* init node attributes */
4047		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4048
4049	info = be_get_info(res);
4050	(void) info; /* avoid potential warning */
4051	info->out_infos[0].req = &sparc_requirements__none;
4052	info->out_infos[1].req = &sparc_requirements__none;
4053
4054
4055	attr = (sparc_jmp_cond_attr_t*)get_irn_generic_attr(res);
4056	(void) attr; /* avoid potential warning */
4057		init_sparc_jmp_cond_attr(res, relation, is_unsigned);
4058	/* optimize node */
4059	res = optimize_node(res);
4060	irn_verify_irg(res, irg);
4061
4062	return res;
4063}
4064
4065/**
4066 * construct OrN node
4067 */
4068ir_node *new_bd_sparc_OrN_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4069{
4070	ir_graph         *irg        = get_irn_irg(block);
4071	ir_op            *op         = op_sparc_OrN;
4072	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4073	ir_node          *res;
4074	backend_info_t   *info;
4075	int             arity   = 1;
4076	ir_node        *in[1];
4077	int             n_res   = 1;
4078	ir_mode        *mode    = mode_Iu;
4079	static const arch_register_req_t *in_reqs[] =
4080	{
4081		& sparc_requirements_gp_gp,
4082	};
4083
4084	/* construct in array */
4085	in[0] = left;
4086
4087	/* flags */
4088	irn_flags_ |= arch_irn_flags_rematerializable;
4089
4090	/* create node */
4091	assert(op != NULL);
4092	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4093
4094	/* init node attributes */
4095		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4096	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4097	info = be_get_info(res);
4098	(void) info; /* avoid potential warning */
4099	info->out_infos[0].req = &sparc_requirements_gp_gp;
4100
4101
4102	/* optimize node */
4103	res = optimize_node(res);
4104	irn_verify_irg(res, irg);
4105
4106	return res;
4107}
4108
4109/**
4110 * construct OrN node
4111 */
4112ir_node *new_bd_sparc_OrN_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4113{
4114	ir_graph         *irg        = get_irn_irg(block);
4115	ir_op            *op         = op_sparc_OrN;
4116	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4117	ir_node          *res;
4118	backend_info_t   *info;
4119	int             arity   = 2;
4120	ir_node        *in[2];
4121	int             n_res   = 1;
4122	ir_mode        *mode    = mode_Iu;
4123	static const arch_register_req_t *in_reqs[] =
4124	{
4125		& sparc_requirements_gp_gp,
4126		& sparc_requirements_gp_gp,
4127	};
4128
4129	/* construct in array */
4130	in[0] = left;
4131	in[1] = right;
4132
4133	/* flags */
4134	irn_flags_ |= arch_irn_flags_rematerializable;
4135
4136	/* create node */
4137	assert(op != NULL);
4138	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4139
4140	/* init node attributes */
4141		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4142
4143	info = be_get_info(res);
4144	(void) info; /* avoid potential warning */
4145	info->out_infos[0].req = &sparc_requirements_gp_gp;
4146
4147
4148	/* optimize node */
4149	res = optimize_node(res);
4150	irn_verify_irg(res, irg);
4151
4152	return res;
4153}
4154
4155/**
4156 * construct SubX node
4157 */
4158ir_node *new_bd_sparc_SubX_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *carry, ir_entity *immediate_entity, int32_t immediate_value)
4159{
4160	ir_graph         *irg        = get_irn_irg(block);
4161	ir_op            *op         = op_sparc_SubX;
4162	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4163	ir_node          *res;
4164	backend_info_t   *info;
4165	int             arity   = 2;
4166	ir_node        *in[2];
4167	int             n_res   = 1;
4168	ir_mode        *mode    = mode_Iu;
4169	static const arch_register_req_t *in_reqs[] =
4170	{
4171		& sparc_requirements_gp_gp,
4172		& sparc_requirements_flags_class_flags,
4173	};
4174
4175	/* construct in array */
4176	in[0] = left;
4177	in[1] = carry;
4178
4179	/* create node */
4180	assert(op != NULL);
4181	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4182
4183	/* init node attributes */
4184		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4185	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4186	info = be_get_info(res);
4187	(void) info; /* avoid potential warning */
4188	info->out_infos[0].req = &sparc_requirements_gp_gp;
4189
4190
4191	/* optimize node */
4192	res = optimize_node(res);
4193	irn_verify_irg(res, irg);
4194
4195	return res;
4196}
4197
4198/**
4199 * construct SubX node
4200 */
4201ir_node *new_bd_sparc_SubX_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_node *carry)
4202{
4203	ir_graph         *irg        = get_irn_irg(block);
4204	ir_op            *op         = op_sparc_SubX;
4205	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4206	ir_node          *res;
4207	backend_info_t   *info;
4208	int             arity   = 3;
4209	ir_node        *in[3];
4210	int             n_res   = 1;
4211	ir_mode        *mode    = mode_Iu;
4212	static const arch_register_req_t *in_reqs[] =
4213	{
4214		& sparc_requirements_gp_gp,
4215		& sparc_requirements_gp_gp,
4216		& sparc_requirements_flags_class_flags,
4217	};
4218
4219	/* construct in array */
4220	in[0] = left;
4221	in[1] = right;
4222	in[2] = carry;
4223
4224	/* create node */
4225	assert(op != NULL);
4226	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4227
4228	/* init node attributes */
4229		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4230
4231	info = be_get_info(res);
4232	(void) info; /* avoid potential warning */
4233	info->out_infos[0].req = &sparc_requirements_gp_gp;
4234
4235
4236	/* optimize node */
4237	res = optimize_node(res);
4238	irn_verify_irg(res, irg);
4239
4240	return res;
4241}
4242
4243/**
4244 * construct fcmp node
4245 */
4246ir_node *new_bd_sparc_fcmp_q(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_node *op1, ir_mode *fp_mode)
4247{
4248	ir_graph         *irg        = get_irn_irg(block);
4249	ir_op            *op         = op_sparc_fcmp;
4250	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4251	ir_node          *res;
4252	backend_info_t   *info;
4253	int             arity   = 2;
4254	ir_node        *in[2];
4255	int             n_res   = 1;
4256	ir_mode        *mode    = mode_Bu;
4257	static const arch_register_req_t *in_reqs[] =
4258	{
4259		& sparc_requirements_fp_fp_a_4,
4260		& sparc_requirements_fp_fp_a_4,
4261	};
4262
4263	/* construct in array */
4264	in[0] = op0;
4265	in[1] = op1;
4266
4267	/* flags */
4268	irn_flags_ |= arch_irn_flags_rematerializable;
4269
4270	/* create node */
4271	assert(op != NULL);
4272	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4273
4274	/* init node attributes */
4275		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4276	init_sparc_fp_attributes(res, fp_mode);
4277
4278
4279	info = be_get_info(res);
4280	(void) info; /* avoid potential warning */
4281	info->out_infos[0].req = &sparc_requirements_fpflags_class_fpflags;
4282
4283
4284	/* optimize node */
4285	res = optimize_node(res);
4286	irn_verify_irg(res, irg);
4287
4288	return res;
4289}
4290
4291/**
4292 * construct fcmp node
4293 */
4294ir_node *new_bd_sparc_fcmp_d(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_node *op1, ir_mode *fp_mode)
4295{
4296	ir_graph         *irg        = get_irn_irg(block);
4297	ir_op            *op         = op_sparc_fcmp;
4298	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4299	ir_node          *res;
4300	backend_info_t   *info;
4301	int             arity   = 2;
4302	ir_node        *in[2];
4303	int             n_res   = 1;
4304	ir_mode        *mode    = mode_Bu;
4305	static const arch_register_req_t *in_reqs[] =
4306	{
4307		& sparc_requirements_fp_fp_a_2,
4308		& sparc_requirements_fp_fp_a_2,
4309	};
4310
4311	/* construct in array */
4312	in[0] = op0;
4313	in[1] = op1;
4314
4315	/* flags */
4316	irn_flags_ |= arch_irn_flags_rematerializable;
4317
4318	/* create node */
4319	assert(op != NULL);
4320	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4321
4322	/* init node attributes */
4323		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4324	init_sparc_fp_attributes(res, fp_mode);
4325
4326
4327	info = be_get_info(res);
4328	(void) info; /* avoid potential warning */
4329	info->out_infos[0].req = &sparc_requirements_fpflags_class_fpflags;
4330
4331
4332	/* optimize node */
4333	res = optimize_node(res);
4334	irn_verify_irg(res, irg);
4335
4336	return res;
4337}
4338
4339/**
4340 * construct fcmp node
4341 */
4342ir_node *new_bd_sparc_fcmp_s(dbg_info *dbgi, ir_node *block, ir_node *op0, ir_node *op1, ir_mode *fp_mode)
4343{
4344	ir_graph         *irg        = get_irn_irg(block);
4345	ir_op            *op         = op_sparc_fcmp;
4346	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4347	ir_node          *res;
4348	backend_info_t   *info;
4349	int             arity   = 2;
4350	ir_node        *in[2];
4351	int             n_res   = 1;
4352	ir_mode        *mode    = mode_Bu;
4353	static const arch_register_req_t *in_reqs[] =
4354	{
4355		& sparc_requirements_fp_fp,
4356		& sparc_requirements_fp_fp,
4357	};
4358
4359	/* construct in array */
4360	in[0] = op0;
4361	in[1] = op1;
4362
4363	/* flags */
4364	irn_flags_ |= arch_irn_flags_rematerializable;
4365
4366	/* create node */
4367	assert(op != NULL);
4368	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4369
4370	/* init node attributes */
4371		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4372	init_sparc_fp_attributes(res, fp_mode);
4373
4374
4375	info = be_get_info(res);
4376	(void) info; /* avoid potential warning */
4377	info->out_infos[0].req = &sparc_requirements_fpflags_class_fpflags;
4378
4379
4380	/* optimize node */
4381	res = optimize_node(res);
4382	irn_verify_irg(res, irg);
4383
4384	return res;
4385}
4386
4387/**
4388 * construct OrCCZero node
4389 */
4390ir_node *new_bd_sparc_OrCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4391{
4392	ir_graph         *irg        = get_irn_irg(block);
4393	ir_op            *op         = op_sparc_OrCCZero;
4394	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4395	ir_node          *res;
4396	backend_info_t   *info;
4397	int             arity   = 1;
4398	ir_node        *in[1];
4399	int             n_res   = 1;
4400	ir_mode        *mode    = mode_Bu;
4401	static const arch_register_req_t *in_reqs[] =
4402	{
4403		& sparc_requirements_gp_gp,
4404	};
4405
4406	/* construct in array */
4407	in[0] = left;
4408
4409	/* flags */
4410	irn_flags_ |= arch_irn_flags_rematerializable;
4411
4412	/* create node */
4413	assert(op != NULL);
4414	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4415
4416	/* init node attributes */
4417		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4418	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4419	info = be_get_info(res);
4420	(void) info; /* avoid potential warning */
4421	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4422
4423
4424	/* optimize node */
4425	res = optimize_node(res);
4426	irn_verify_irg(res, irg);
4427
4428	return res;
4429}
4430
4431/**
4432 * construct OrCCZero node
4433 */
4434ir_node *new_bd_sparc_OrCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4435{
4436	ir_graph         *irg        = get_irn_irg(block);
4437	ir_op            *op         = op_sparc_OrCCZero;
4438	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4439	ir_node          *res;
4440	backend_info_t   *info;
4441	int             arity   = 2;
4442	ir_node        *in[2];
4443	int             n_res   = 1;
4444	ir_mode        *mode    = mode_Bu;
4445	static const arch_register_req_t *in_reqs[] =
4446	{
4447		& sparc_requirements_gp_gp,
4448		& sparc_requirements_gp_gp,
4449	};
4450
4451	/* construct in array */
4452	in[0] = left;
4453	in[1] = right;
4454
4455	/* flags */
4456	irn_flags_ |= arch_irn_flags_rematerializable;
4457
4458	/* create node */
4459	assert(op != NULL);
4460	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4461
4462	/* init node attributes */
4463		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4464
4465	info = be_get_info(res);
4466	(void) info; /* avoid potential warning */
4467	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4468
4469
4470	/* optimize node */
4471	res = optimize_node(res);
4472	irn_verify_irg(res, irg);
4473
4474	return res;
4475}
4476
4477/**
4478 * construct AddSP node
4479 */
4480ir_node *new_bd_sparc_AddSP(dbg_info *dbgi, ir_node *block, ir_node *stack, ir_node *size)
4481{
4482	ir_graph         *irg        = get_irn_irg(block);
4483	ir_op            *op         = op_sparc_AddSP;
4484	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4485	ir_node          *res;
4486	backend_info_t   *info;
4487	int             arity   = 2;
4488	ir_node        *in[2];
4489	int             n_res   = 1;
4490	ir_mode        *mode    = mode_Iu;
4491	static const arch_register_req_t *in_reqs[] =
4492	{
4493		& sparc_requirements_gp_sp,
4494		& sparc_requirements_gp_gp,
4495	};
4496
4497	/* construct in array */
4498	in[0] = stack;
4499	in[1] = size;
4500
4501	/* create node */
4502	assert(op != NULL);
4503	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4504
4505	/* init node attributes */
4506		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4507
4508	info = be_get_info(res);
4509	(void) info; /* avoid potential warning */
4510	info->out_infos[0].req = &sparc_requirements_gp_sp_I_S;
4511
4512
4513	/* optimize node */
4514	res = optimize_node(res);
4515	irn_verify_irg(res, irg);
4516
4517	return res;
4518}
4519
4520/**
4521 * construct SMulh node
4522 */
4523ir_node *new_bd_sparc_SMulh_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4524{
4525	ir_graph         *irg        = get_irn_irg(block);
4526	ir_op            *op         = op_sparc_SMulh;
4527	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4528	ir_node          *res;
4529	backend_info_t   *info;
4530	int             arity   = 1;
4531	ir_node        *in[1];
4532	int             n_res   = 1;
4533	ir_mode        *mode    = mode_T;
4534	static const arch_register_req_t *in_reqs[] =
4535	{
4536		& sparc_requirements_gp_gp,
4537	};
4538
4539	/* construct in array */
4540	in[0] = left;
4541
4542	/* flags */
4543	irn_flags_ |= arch_irn_flags_rematerializable;
4544
4545	/* create node */
4546	assert(op != NULL);
4547	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4548
4549	/* init node attributes */
4550		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4551	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4552	info = be_get_info(res);
4553	(void) info; /* avoid potential warning */
4554	info->out_infos[0].req = &sparc_requirements_gp_gp;
4555
4556
4557	/* optimize node */
4558	res = optimize_node(res);
4559	irn_verify_irg(res, irg);
4560
4561	return res;
4562}
4563
4564/**
4565 * construct SMulh node
4566 */
4567ir_node *new_bd_sparc_SMulh_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4568{
4569	ir_graph         *irg        = get_irn_irg(block);
4570	ir_op            *op         = op_sparc_SMulh;
4571	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4572	ir_node          *res;
4573	backend_info_t   *info;
4574	int             arity   = 2;
4575	ir_node        *in[2];
4576	int             n_res   = 1;
4577	ir_mode        *mode    = mode_T;
4578	static const arch_register_req_t *in_reqs[] =
4579	{
4580		& sparc_requirements_gp_gp,
4581		& sparc_requirements_gp_gp,
4582	};
4583
4584	/* construct in array */
4585	in[0] = left;
4586	in[1] = right;
4587
4588	/* flags */
4589	irn_flags_ |= arch_irn_flags_rematerializable;
4590
4591	/* create node */
4592	assert(op != NULL);
4593	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4594
4595	/* init node attributes */
4596		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4597
4598	info = be_get_info(res);
4599	(void) info; /* avoid potential warning */
4600	info->out_infos[0].req = &sparc_requirements_gp_gp;
4601
4602
4603	/* optimize node */
4604	res = optimize_node(res);
4605	irn_verify_irg(res, irg);
4606
4607	return res;
4608}
4609
4610/**
4611 * construct AddCC_t node
4612 */
4613ir_node *new_bd_sparc_AddCC_t(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4614{
4615	ir_graph         *irg        = get_irn_irg(block);
4616	ir_op            *op         = op_sparc_AddCC_t;
4617	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4618	ir_node          *res;
4619	backend_info_t   *info;
4620	int             arity   = 2;
4621	ir_node        *in[2];
4622	int             n_res   = 2;
4623	ir_mode        *mode    = mode_T;
4624	static const arch_register_req_t **in_reqs = NULL;
4625
4626	/* construct in array */
4627	in[0] = left;
4628	in[1] = right;
4629
4630	/* create node */
4631	assert(op != NULL);
4632	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4633
4634	/* init node attributes */
4635	(void)in;(void)irn_flags_;(void)in_reqs;(void)n_res;
4636
4637	info = be_get_info(res);
4638	(void) info; /* avoid potential warning */
4639
4640
4641	/* optimize node */
4642	res = optimize_node(res);
4643	irn_verify_irg(res, irg);
4644
4645	return res;
4646}
4647
4648/**
4649 * construct Return node
4650 */
4651ir_node *new_bd_sparc_Return_imm(dbg_info *dbgi, ir_node *block, int arity, ir_node *in[], ir_entity *entity, int32_t offset)
4652{
4653	ir_graph         *irg        = get_irn_irg(block);
4654	ir_op            *op         = op_sparc_Return;
4655	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4656	ir_node          *res;
4657	backend_info_t   *info;
4658	int             n_res   = 1;
4659	ir_mode        *mode    = mode_X;
4660	static const arch_register_req_t **in_reqs = NULL;
4661
4662	/* flags */
4663	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
4664
4665	/* create node */
4666	assert(op != NULL);
4667	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4668
4669	/* init node attributes */
4670		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4671		sparc_set_attr_imm(res, entity, offset);
4672	info = be_get_info(res);
4673	(void) info; /* avoid potential warning */
4674	info->out_infos[0].req = &sparc_requirements__none;
4675
4676
4677	/* optimize node */
4678	res = optimize_node(res);
4679	irn_verify_irg(res, irg);
4680
4681	return res;
4682}
4683
4684/**
4685 * construct Return node
4686 */
4687ir_node *new_bd_sparc_Return_reg(dbg_info *dbgi, ir_node *block, int arity, ir_node *in[])
4688{
4689	ir_graph         *irg        = get_irn_irg(block);
4690	ir_op            *op         = op_sparc_Return;
4691	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4692	ir_node          *res;
4693	backend_info_t   *info;
4694	int             n_res   = 1;
4695	ir_mode        *mode    = mode_X;
4696	static const arch_register_req_t **in_reqs = NULL;
4697
4698	/* flags */
4699	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
4700
4701	/* create node */
4702	assert(op != NULL);
4703	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4704
4705	/* init node attributes */
4706		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4707
4708	info = be_get_info(res);
4709	(void) info; /* avoid potential warning */
4710	info->out_infos[0].req = &sparc_requirements__none;
4711
4712
4713	/* optimize node */
4714	res = optimize_node(res);
4715	irn_verify_irg(res, irg);
4716
4717	return res;
4718}
4719
4720/**
4721 * construct XNor node
4722 */
4723ir_node *new_bd_sparc_XNor_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4724{
4725	ir_graph         *irg        = get_irn_irg(block);
4726	ir_op            *op         = op_sparc_XNor;
4727	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4728	ir_node          *res;
4729	backend_info_t   *info;
4730	int             arity   = 1;
4731	ir_node        *in[1];
4732	int             n_res   = 1;
4733	ir_mode        *mode    = mode_Iu;
4734	static const arch_register_req_t *in_reqs[] =
4735	{
4736		& sparc_requirements_gp_gp,
4737	};
4738
4739	/* construct in array */
4740	in[0] = left;
4741
4742	/* flags */
4743	irn_flags_ |= arch_irn_flags_rematerializable;
4744
4745	/* create node */
4746	assert(op != NULL);
4747	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4748
4749	/* init node attributes */
4750		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4751	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4752	info = be_get_info(res);
4753	(void) info; /* avoid potential warning */
4754	info->out_infos[0].req = &sparc_requirements_gp_gp;
4755
4756
4757	/* optimize node */
4758	res = optimize_node(res);
4759	irn_verify_irg(res, irg);
4760
4761	return res;
4762}
4763
4764/**
4765 * construct XNor node
4766 */
4767ir_node *new_bd_sparc_XNor_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4768{
4769	ir_graph         *irg        = get_irn_irg(block);
4770	ir_op            *op         = op_sparc_XNor;
4771	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4772	ir_node          *res;
4773	backend_info_t   *info;
4774	int             arity   = 2;
4775	ir_node        *in[2];
4776	int             n_res   = 1;
4777	ir_mode        *mode    = mode_Iu;
4778	static const arch_register_req_t *in_reqs[] =
4779	{
4780		& sparc_requirements_gp_gp,
4781		& sparc_requirements_gp_gp,
4782	};
4783
4784	/* construct in array */
4785	in[0] = left;
4786	in[1] = right;
4787
4788	/* flags */
4789	irn_flags_ |= arch_irn_flags_rematerializable;
4790
4791	/* create node */
4792	assert(op != NULL);
4793	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4794
4795	/* init node attributes */
4796		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4797
4798	info = be_get_info(res);
4799	(void) info; /* avoid potential warning */
4800	info->out_infos[0].req = &sparc_requirements_gp_gp;
4801
4802
4803	/* optimize node */
4804	res = optimize_node(res);
4805	irn_verify_irg(res, irg);
4806
4807	return res;
4808}
4809
4810/**
4811 * construct AndNCCZero node
4812 */
4813ir_node *new_bd_sparc_AndNCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4814{
4815	ir_graph         *irg        = get_irn_irg(block);
4816	ir_op            *op         = op_sparc_AndNCCZero;
4817	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4818	ir_node          *res;
4819	backend_info_t   *info;
4820	int             arity   = 1;
4821	ir_node        *in[1];
4822	int             n_res   = 1;
4823	ir_mode        *mode    = mode_Bu;
4824	static const arch_register_req_t *in_reqs[] =
4825	{
4826		& sparc_requirements_gp_gp,
4827	};
4828
4829	/* construct in array */
4830	in[0] = left;
4831
4832	/* flags */
4833	irn_flags_ |= arch_irn_flags_rematerializable;
4834
4835	/* create node */
4836	assert(op != NULL);
4837	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4838
4839	/* init node attributes */
4840		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4841	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4842	info = be_get_info(res);
4843	(void) info; /* avoid potential warning */
4844	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4845
4846
4847	/* optimize node */
4848	res = optimize_node(res);
4849	irn_verify_irg(res, irg);
4850
4851	return res;
4852}
4853
4854/**
4855 * construct AndNCCZero node
4856 */
4857ir_node *new_bd_sparc_AndNCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4858{
4859	ir_graph         *irg        = get_irn_irg(block);
4860	ir_op            *op         = op_sparc_AndNCCZero;
4861	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4862	ir_node          *res;
4863	backend_info_t   *info;
4864	int             arity   = 2;
4865	ir_node        *in[2];
4866	int             n_res   = 1;
4867	ir_mode        *mode    = mode_Bu;
4868	static const arch_register_req_t *in_reqs[] =
4869	{
4870		& sparc_requirements_gp_gp,
4871		& sparc_requirements_gp_gp,
4872	};
4873
4874	/* construct in array */
4875	in[0] = left;
4876	in[1] = right;
4877
4878	/* flags */
4879	irn_flags_ |= arch_irn_flags_rematerializable;
4880
4881	/* create node */
4882	assert(op != NULL);
4883	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4884
4885	/* init node attributes */
4886		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4887
4888	info = be_get_info(res);
4889	(void) info; /* avoid potential warning */
4890	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4891
4892
4893	/* optimize node */
4894	res = optimize_node(res);
4895	irn_verify_irg(res, irg);
4896
4897	return res;
4898}
4899
4900/**
4901 * construct AndCCZero node
4902 */
4903ir_node *new_bd_sparc_AndCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
4904{
4905	ir_graph         *irg        = get_irn_irg(block);
4906	ir_op            *op         = op_sparc_AndCCZero;
4907	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4908	ir_node          *res;
4909	backend_info_t   *info;
4910	int             arity   = 1;
4911	ir_node        *in[1];
4912	int             n_res   = 1;
4913	ir_mode        *mode    = mode_Bu;
4914	static const arch_register_req_t *in_reqs[] =
4915	{
4916		& sparc_requirements_gp_gp,
4917	};
4918
4919	/* construct in array */
4920	in[0] = left;
4921
4922	/* flags */
4923	irn_flags_ |= arch_irn_flags_rematerializable;
4924
4925	/* create node */
4926	assert(op != NULL);
4927	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4928
4929	/* init node attributes */
4930		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4931	sparc_set_attr_imm(res, immediate_entity, immediate_value);
4932	info = be_get_info(res);
4933	(void) info; /* avoid potential warning */
4934	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4935
4936
4937	/* optimize node */
4938	res = optimize_node(res);
4939	irn_verify_irg(res, irg);
4940
4941	return res;
4942}
4943
4944/**
4945 * construct AndCCZero node
4946 */
4947ir_node *new_bd_sparc_AndCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
4948{
4949	ir_graph         *irg        = get_irn_irg(block);
4950	ir_op            *op         = op_sparc_AndCCZero;
4951	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4952	ir_node          *res;
4953	backend_info_t   *info;
4954	int             arity   = 2;
4955	ir_node        *in[2];
4956	int             n_res   = 1;
4957	ir_mode        *mode    = mode_Bu;
4958	static const arch_register_req_t *in_reqs[] =
4959	{
4960		& sparc_requirements_gp_gp,
4961		& sparc_requirements_gp_gp,
4962	};
4963
4964	/* construct in array */
4965	in[0] = left;
4966	in[1] = right;
4967
4968	/* flags */
4969	irn_flags_ |= arch_irn_flags_rematerializable;
4970
4971	/* create node */
4972	assert(op != NULL);
4973	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
4974
4975	/* init node attributes */
4976		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
4977
4978	info = be_get_info(res);
4979	(void) info; /* avoid potential warning */
4980	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
4981
4982
4983	/* optimize node */
4984	res = optimize_node(res);
4985	irn_verify_irg(res, irg);
4986
4987	return res;
4988}
4989
4990/**
4991 * construct FrameAddr node
4992 */
4993ir_node *new_bd_sparc_FrameAddr(dbg_info *dbgi, ir_node *block, ir_node *base, ir_entity *entity, int32_t offset)
4994{
4995	ir_graph         *irg        = get_irn_irg(block);
4996	ir_op            *op         = op_sparc_FrameAddr;
4997	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
4998	ir_node          *res;
4999	backend_info_t   *info;
5000	int             arity   = 1;
5001	ir_node        *in[1];
5002	int             n_res   = 1;
5003	ir_mode        *mode    = mode_Iu;
5004	static const arch_register_req_t *in_reqs[] =
5005	{
5006		& sparc_requirements_gp_gp,
5007	};
5008
5009	/* construct in array */
5010	in[0] = base;
5011
5012	/* flags */
5013	irn_flags_ |= arch_irn_flags_rematerializable;
5014
5015	/* create node */
5016	assert(op != NULL);
5017	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5018
5019	/* init node attributes */
5020		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5021	sparc_set_attr_imm(res, entity, offset);
5022	info = be_get_info(res);
5023	(void) info; /* avoid potential warning */
5024	info->out_infos[0].req = &sparc_requirements_gp_gp;
5025
5026
5027	/* optimize node */
5028	res = optimize_node(res);
5029	irn_verify_irg(res, irg);
5030
5031	return res;
5032}
5033
5034/**
5035 * construct OrNCCZero node
5036 */
5037ir_node *new_bd_sparc_OrNCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
5038{
5039	ir_graph         *irg        = get_irn_irg(block);
5040	ir_op            *op         = op_sparc_OrNCCZero;
5041	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5042	ir_node          *res;
5043	backend_info_t   *info;
5044	int             arity   = 1;
5045	ir_node        *in[1];
5046	int             n_res   = 1;
5047	ir_mode        *mode    = mode_Bu;
5048	static const arch_register_req_t *in_reqs[] =
5049	{
5050		& sparc_requirements_gp_gp,
5051	};
5052
5053	/* construct in array */
5054	in[0] = left;
5055
5056	/* flags */
5057	irn_flags_ |= arch_irn_flags_rematerializable;
5058
5059	/* create node */
5060	assert(op != NULL);
5061	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5062
5063	/* init node attributes */
5064		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5065	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5066	info = be_get_info(res);
5067	(void) info; /* avoid potential warning */
5068	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
5069
5070
5071	/* optimize node */
5072	res = optimize_node(res);
5073	irn_verify_irg(res, irg);
5074
5075	return res;
5076}
5077
5078/**
5079 * construct OrNCCZero node
5080 */
5081ir_node *new_bd_sparc_OrNCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
5082{
5083	ir_graph         *irg        = get_irn_irg(block);
5084	ir_op            *op         = op_sparc_OrNCCZero;
5085	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5086	ir_node          *res;
5087	backend_info_t   *info;
5088	int             arity   = 2;
5089	ir_node        *in[2];
5090	int             n_res   = 1;
5091	ir_mode        *mode    = mode_Bu;
5092	static const arch_register_req_t *in_reqs[] =
5093	{
5094		& sparc_requirements_gp_gp,
5095		& sparc_requirements_gp_gp,
5096	};
5097
5098	/* construct in array */
5099	in[0] = left;
5100	in[1] = right;
5101
5102	/* flags */
5103	irn_flags_ |= arch_irn_flags_rematerializable;
5104
5105	/* create node */
5106	assert(op != NULL);
5107	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5108
5109	/* init node attributes */
5110		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5111
5112	info = be_get_info(res);
5113	(void) info; /* avoid potential warning */
5114	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
5115
5116
5117	/* optimize node */
5118	res = optimize_node(res);
5119	irn_verify_irg(res, irg);
5120
5121	return res;
5122}
5123
5124/**
5125 * construct And node
5126 */
5127ir_node *new_bd_sparc_And_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
5128{
5129	ir_graph         *irg        = get_irn_irg(block);
5130	ir_op            *op         = op_sparc_And;
5131	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5132	ir_node          *res;
5133	backend_info_t   *info;
5134	int             arity   = 1;
5135	ir_node        *in[1];
5136	int             n_res   = 1;
5137	ir_mode        *mode    = mode_Iu;
5138	static const arch_register_req_t *in_reqs[] =
5139	{
5140		& sparc_requirements_gp_gp,
5141	};
5142
5143	/* construct in array */
5144	in[0] = left;
5145
5146	/* flags */
5147	irn_flags_ |= arch_irn_flags_rematerializable;
5148
5149	/* create node */
5150	assert(op != NULL);
5151	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5152
5153	/* init node attributes */
5154		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5155	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5156	info = be_get_info(res);
5157	(void) info; /* avoid potential warning */
5158	info->out_infos[0].req = &sparc_requirements_gp_gp;
5159
5160
5161	/* optimize node */
5162	res = optimize_node(res);
5163	irn_verify_irg(res, irg);
5164
5165	return res;
5166}
5167
5168/**
5169 * construct And node
5170 */
5171ir_node *new_bd_sparc_And_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
5172{
5173	ir_graph         *irg        = get_irn_irg(block);
5174	ir_op            *op         = op_sparc_And;
5175	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5176	ir_node          *res;
5177	backend_info_t   *info;
5178	int             arity   = 2;
5179	ir_node        *in[2];
5180	int             n_res   = 1;
5181	ir_mode        *mode    = mode_Iu;
5182	static const arch_register_req_t *in_reqs[] =
5183	{
5184		& sparc_requirements_gp_gp,
5185		& sparc_requirements_gp_gp,
5186	};
5187
5188	/* construct in array */
5189	in[0] = left;
5190	in[1] = right;
5191
5192	/* flags */
5193	irn_flags_ |= arch_irn_flags_rematerializable;
5194
5195	/* create node */
5196	assert(op != NULL);
5197	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5198
5199	/* init node attributes */
5200		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5201
5202	info = be_get_info(res);
5203	(void) info; /* avoid potential warning */
5204	info->out_infos[0].req = &sparc_requirements_gp_gp;
5205
5206
5207	/* optimize node */
5208	res = optimize_node(res);
5209	irn_verify_irg(res, irg);
5210
5211	return res;
5212}
5213
5214/**
5215 * construct fmul node
5216 */
5217ir_node *new_bd_sparc_fmul_q(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
5218{
5219	ir_graph         *irg        = get_irn_irg(block);
5220	ir_op            *op         = op_sparc_fmul;
5221	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5222	ir_node          *res;
5223	backend_info_t   *info;
5224	int             arity   = 2;
5225	ir_node        *in[2];
5226	int             n_res   = 1;
5227	ir_mode        *mode    = mode_Q;
5228	static const arch_register_req_t *in_reqs[] =
5229	{
5230		& sparc_requirements_fp_fp_a_4,
5231		& sparc_requirements_fp_fp_a_4,
5232	};
5233
5234	/* construct in array */
5235	in[0] = left;
5236	in[1] = right;
5237
5238	/* flags */
5239	irn_flags_ |= arch_irn_flags_rematerializable;
5240
5241	/* create node */
5242	assert(op != NULL);
5243	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5244
5245	/* init node attributes */
5246		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5247	init_sparc_fp_attributes(res, fp_mode);
5248
5249
5250	info = be_get_info(res);
5251	(void) info; /* avoid potential warning */
5252	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
5253
5254
5255	/* optimize node */
5256	res = optimize_node(res);
5257	irn_verify_irg(res, irg);
5258
5259	return res;
5260}
5261
5262/**
5263 * construct fmul node
5264 */
5265ir_node *new_bd_sparc_fmul_d(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
5266{
5267	ir_graph         *irg        = get_irn_irg(block);
5268	ir_op            *op         = op_sparc_fmul;
5269	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5270	ir_node          *res;
5271	backend_info_t   *info;
5272	int             arity   = 2;
5273	ir_node        *in[2];
5274	int             n_res   = 1;
5275	ir_mode        *mode    = mode_D;
5276	static const arch_register_req_t *in_reqs[] =
5277	{
5278		& sparc_requirements_fp_fp_a_2,
5279		& sparc_requirements_fp_fp_a_2,
5280	};
5281
5282	/* construct in array */
5283	in[0] = left;
5284	in[1] = right;
5285
5286	/* flags */
5287	irn_flags_ |= arch_irn_flags_rematerializable;
5288
5289	/* create node */
5290	assert(op != NULL);
5291	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5292
5293	/* init node attributes */
5294		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5295	init_sparc_fp_attributes(res, fp_mode);
5296
5297
5298	info = be_get_info(res);
5299	(void) info; /* avoid potential warning */
5300	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
5301
5302
5303	/* optimize node */
5304	res = optimize_node(res);
5305	irn_verify_irg(res, irg);
5306
5307	return res;
5308}
5309
5310/**
5311 * construct fmul node
5312 */
5313ir_node *new_bd_sparc_fmul_s(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
5314{
5315	ir_graph         *irg        = get_irn_irg(block);
5316	ir_op            *op         = op_sparc_fmul;
5317	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5318	ir_node          *res;
5319	backend_info_t   *info;
5320	int             arity   = 2;
5321	ir_node        *in[2];
5322	int             n_res   = 1;
5323	ir_mode        *mode    = mode_F;
5324	static const arch_register_req_t *in_reqs[] =
5325	{
5326		& sparc_requirements_fp_fp,
5327		& sparc_requirements_fp_fp,
5328	};
5329
5330	/* construct in array */
5331	in[0] = left;
5332	in[1] = right;
5333
5334	/* flags */
5335	irn_flags_ |= arch_irn_flags_rematerializable;
5336
5337	/* create node */
5338	assert(op != NULL);
5339	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5340
5341	/* init node attributes */
5342		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5343	init_sparc_fp_attributes(res, fp_mode);
5344
5345
5346	info = be_get_info(res);
5347	(void) info; /* avoid potential warning */
5348	info->out_infos[0].req = &sparc_requirements_fp_fp;
5349
5350
5351	/* optimize node */
5352	res = optimize_node(res);
5353	irn_verify_irg(res, irg);
5354
5355	return res;
5356}
5357
5358/**
5359 * construct AddCCZero node
5360 */
5361ir_node *new_bd_sparc_AddCCZero_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
5362{
5363	ir_graph         *irg        = get_irn_irg(block);
5364	ir_op            *op         = op_sparc_AddCCZero;
5365	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5366	ir_node          *res;
5367	backend_info_t   *info;
5368	int             arity   = 1;
5369	ir_node        *in[1];
5370	int             n_res   = 1;
5371	ir_mode        *mode    = mode_Bu;
5372	static const arch_register_req_t *in_reqs[] =
5373	{
5374		& sparc_requirements_gp_gp,
5375	};
5376
5377	/* construct in array */
5378	in[0] = left;
5379
5380	/* flags */
5381	irn_flags_ |= arch_irn_flags_rematerializable;
5382
5383	/* create node */
5384	assert(op != NULL);
5385	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5386
5387	/* init node attributes */
5388		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5389	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5390	info = be_get_info(res);
5391	(void) info; /* avoid potential warning */
5392	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
5393
5394
5395	/* optimize node */
5396	res = optimize_node(res);
5397	irn_verify_irg(res, irg);
5398
5399	return res;
5400}
5401
5402/**
5403 * construct AddCCZero node
5404 */
5405ir_node *new_bd_sparc_AddCCZero_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
5406{
5407	ir_graph         *irg        = get_irn_irg(block);
5408	ir_op            *op         = op_sparc_AddCCZero;
5409	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5410	ir_node          *res;
5411	backend_info_t   *info;
5412	int             arity   = 2;
5413	ir_node        *in[2];
5414	int             n_res   = 1;
5415	ir_mode        *mode    = mode_Bu;
5416	static const arch_register_req_t *in_reqs[] =
5417	{
5418		& sparc_requirements_gp_gp,
5419		& sparc_requirements_gp_gp,
5420	};
5421
5422	/* construct in array */
5423	in[0] = left;
5424	in[1] = right;
5425
5426	/* flags */
5427	irn_flags_ |= arch_irn_flags_rematerializable;
5428
5429	/* create node */
5430	assert(op != NULL);
5431	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5432
5433	/* init node attributes */
5434		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5435
5436	info = be_get_info(res);
5437	(void) info; /* avoid potential warning */
5438	info->out_infos[0].req = &sparc_requirements_flags_class_flags;
5439
5440
5441	/* optimize node */
5442	res = optimize_node(res);
5443	irn_verify_irg(res, irg);
5444
5445	return res;
5446}
5447
5448/**
5449 * construct UDiv node
5450 */
5451ir_node *new_bd_sparc_UDiv_imm(dbg_info *dbgi, ir_node *block, ir_node *dividend_high, ir_node *dividend_low, ir_entity *immediate_entity, int32_t immediate_value)
5452{
5453	ir_graph         *irg        = get_irn_irg(block);
5454	ir_op            *op         = op_sparc_UDiv;
5455	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5456	ir_node          *res;
5457	backend_info_t   *info;
5458	int             arity   = 2;
5459	ir_node        *in[2];
5460	int             n_res   = 1;
5461	ir_mode        *mode    = mode_T;
5462	static const arch_register_req_t *in_reqs[] =
5463	{
5464		& sparc_requirements_gp_gp,
5465		& sparc_requirements_gp_gp,
5466	};
5467
5468	/* construct in array */
5469	in[0] = dividend_high;
5470	in[1] = dividend_low;
5471
5472	/* flags */
5473	irn_flags_ |= arch_irn_flags_rematerializable;
5474	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
5475
5476	/* create node */
5477	assert(op != NULL);
5478	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5479
5480	/* init node attributes */
5481		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5482	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5483	info = be_get_info(res);
5484	(void) info; /* avoid potential warning */
5485	info->out_infos[0].req = &sparc_requirements_gp_gp;
5486
5487
5488	/* optimize node */
5489	res = optimize_node(res);
5490	irn_verify_irg(res, irg);
5491
5492	return res;
5493}
5494
5495/**
5496 * construct UDiv node
5497 */
5498ir_node *new_bd_sparc_UDiv_reg(dbg_info *dbgi, ir_node *block, ir_node *dividend_high, ir_node *dividend_low, ir_node *divisor)
5499{
5500	ir_graph         *irg        = get_irn_irg(block);
5501	ir_op            *op         = op_sparc_UDiv;
5502	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5503	ir_node          *res;
5504	backend_info_t   *info;
5505	int             arity   = 3;
5506	ir_node        *in[3];
5507	int             n_res   = 1;
5508	ir_mode        *mode    = mode_T;
5509	static const arch_register_req_t *in_reqs[] =
5510	{
5511		& sparc_requirements_gp_gp,
5512		& sparc_requirements_gp_gp,
5513		& sparc_requirements_gp_gp,
5514	};
5515
5516	/* construct in array */
5517	in[0] = dividend_high;
5518	in[1] = dividend_low;
5519	in[2] = divisor;
5520
5521	/* flags */
5522	irn_flags_ |= arch_irn_flags_rematerializable;
5523	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
5524
5525	/* create node */
5526	assert(op != NULL);
5527	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5528
5529	/* init node attributes */
5530		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5531
5532	info = be_get_info(res);
5533	(void) info; /* avoid potential warning */
5534	info->out_infos[0].req = &sparc_requirements_gp_gp;
5535
5536
5537	/* optimize node */
5538	res = optimize_node(res);
5539	irn_verify_irg(res, irg);
5540
5541	return res;
5542}
5543
5544/**
5545 * construct Sll node
5546 */
5547ir_node *new_bd_sparc_Sll_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
5548{
5549	ir_graph         *irg        = get_irn_irg(block);
5550	ir_op            *op         = op_sparc_Sll;
5551	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5552	ir_node          *res;
5553	backend_info_t   *info;
5554	int             arity   = 1;
5555	ir_node        *in[1];
5556	int             n_res   = 1;
5557	ir_mode        *mode    = mode_Iu;
5558	static const arch_register_req_t *in_reqs[] =
5559	{
5560		& sparc_requirements_gp_gp,
5561	};
5562
5563	/* construct in array */
5564	in[0] = left;
5565
5566	/* flags */
5567	irn_flags_ |= arch_irn_flags_rematerializable;
5568
5569	/* create node */
5570	assert(op != NULL);
5571	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5572
5573	/* init node attributes */
5574		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5575	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5576	info = be_get_info(res);
5577	(void) info; /* avoid potential warning */
5578	info->out_infos[0].req = &sparc_requirements_gp_gp;
5579
5580
5581	/* optimize node */
5582	res = optimize_node(res);
5583	irn_verify_irg(res, irg);
5584
5585	return res;
5586}
5587
5588/**
5589 * construct Sll node
5590 */
5591ir_node *new_bd_sparc_Sll_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
5592{
5593	ir_graph         *irg        = get_irn_irg(block);
5594	ir_op            *op         = op_sparc_Sll;
5595	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5596	ir_node          *res;
5597	backend_info_t   *info;
5598	int             arity   = 2;
5599	ir_node        *in[2];
5600	int             n_res   = 1;
5601	ir_mode        *mode    = mode_Iu;
5602	static const arch_register_req_t *in_reqs[] =
5603	{
5604		& sparc_requirements_gp_gp,
5605		& sparc_requirements_gp_gp,
5606	};
5607
5608	/* construct in array */
5609	in[0] = left;
5610	in[1] = right;
5611
5612	/* flags */
5613	irn_flags_ |= arch_irn_flags_rematerializable;
5614
5615	/* create node */
5616	assert(op != NULL);
5617	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5618
5619	/* init node attributes */
5620		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5621
5622	info = be_get_info(res);
5623	(void) info; /* avoid potential warning */
5624	info->out_infos[0].req = &sparc_requirements_gp_gp;
5625
5626
5627	/* optimize node */
5628	res = optimize_node(res);
5629	irn_verify_irg(res, irg);
5630
5631	return res;
5632}
5633
5634/**
5635 * construct SwitchJmp node
5636 */
5637ir_node *new_bd_sparc_SwitchJmp(dbg_info *dbgi, ir_node *block, ir_node *op0, int n_res, const ir_switch_table *table, ir_entity *jump_table)
5638{
5639	ir_graph         *irg        = get_irn_irg(block);
5640	ir_op            *op         = op_sparc_SwitchJmp;
5641	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5642	ir_node          *res;
5643	backend_info_t   *info;
5644	int             arity   = 1;
5645	ir_node        *in[1];
5646	ir_mode        *mode    = mode_T;
5647	static const arch_register_req_t *in_reqs[] =
5648	{
5649		& sparc_requirements_gp_gp,
5650	};
5651
5652	/* construct in array */
5653	in[0] = op0;
5654
5655	/* flags */
5656	irn_flags_ |= (arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot;
5657
5658	/* create node */
5659	assert(op != NULL);
5660	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5661
5662	/* init node attributes */
5663		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5664	init_sparc_switch_jmp_attributes(res, table, jump_table);
5665
5666
5667	info = be_get_info(res);
5668	(void) info; /* avoid potential warning */
5669
5670
5671	/* optimize node */
5672	res = optimize_node(res);
5673	irn_verify_irg(res, irg);
5674
5675	return res;
5676}
5677
5678/**
5679 * construct Srl node
5680 */
5681ir_node *new_bd_sparc_Srl_imm(dbg_info *dbgi, ir_node *block, ir_node *left, ir_entity *immediate_entity, int32_t immediate_value)
5682{
5683	ir_graph         *irg        = get_irn_irg(block);
5684	ir_op            *op         = op_sparc_Srl;
5685	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5686	ir_node          *res;
5687	backend_info_t   *info;
5688	int             arity   = 1;
5689	ir_node        *in[1];
5690	int             n_res   = 1;
5691	ir_mode        *mode    = mode_Iu;
5692	static const arch_register_req_t *in_reqs[] =
5693	{
5694		& sparc_requirements_gp_gp,
5695	};
5696
5697	/* construct in array */
5698	in[0] = left;
5699
5700	/* flags */
5701	irn_flags_ |= arch_irn_flags_rematerializable;
5702
5703	/* create node */
5704	assert(op != NULL);
5705	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5706
5707	/* init node attributes */
5708		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5709	sparc_set_attr_imm(res, immediate_entity, immediate_value);
5710	info = be_get_info(res);
5711	(void) info; /* avoid potential warning */
5712	info->out_infos[0].req = &sparc_requirements_gp_gp;
5713
5714
5715	/* optimize node */
5716	res = optimize_node(res);
5717	irn_verify_irg(res, irg);
5718
5719	return res;
5720}
5721
5722/**
5723 * construct Srl node
5724 */
5725ir_node *new_bd_sparc_Srl_reg(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right)
5726{
5727	ir_graph         *irg        = get_irn_irg(block);
5728	ir_op            *op         = op_sparc_Srl;
5729	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5730	ir_node          *res;
5731	backend_info_t   *info;
5732	int             arity   = 2;
5733	ir_node        *in[2];
5734	int             n_res   = 1;
5735	ir_mode        *mode    = mode_Iu;
5736	static const arch_register_req_t *in_reqs[] =
5737	{
5738		& sparc_requirements_gp_gp,
5739		& sparc_requirements_gp_gp,
5740	};
5741
5742	/* construct in array */
5743	in[0] = left;
5744	in[1] = right;
5745
5746	/* flags */
5747	irn_flags_ |= arch_irn_flags_rematerializable;
5748
5749	/* create node */
5750	assert(op != NULL);
5751	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5752
5753	/* init node attributes */
5754		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5755
5756	info = be_get_info(res);
5757	(void) info; /* avoid potential warning */
5758	info->out_infos[0].req = &sparc_requirements_gp_gp;
5759
5760
5761	/* optimize node */
5762	res = optimize_node(res);
5763	irn_verify_irg(res, irg);
5764
5765	return res;
5766}
5767
5768/**
5769 * construct fneg node
5770 */
5771ir_node *new_bd_sparc_fneg_q(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
5772{
5773	ir_graph         *irg        = get_irn_irg(block);
5774	ir_op            *op         = op_sparc_fneg;
5775	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5776	ir_node          *res;
5777	backend_info_t   *info;
5778	int             arity   = 1;
5779	ir_node        *in[1];
5780	int             n_res   = 1;
5781	ir_mode        *mode    = mode_Q;
5782	static const arch_register_req_t *in_reqs[] =
5783	{
5784		& sparc_requirements_fp_fp_a_4,
5785	};
5786
5787	/* construct in array */
5788	in[0] = val;
5789
5790	/* flags */
5791	irn_flags_ |= arch_irn_flags_rematerializable;
5792
5793	/* create node */
5794	assert(op != NULL);
5795	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5796
5797	/* init node attributes */
5798		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5799	init_sparc_fp_attributes(res, fp_mode);
5800
5801
5802	info = be_get_info(res);
5803	(void) info; /* avoid potential warning */
5804	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
5805
5806
5807	/* optimize node */
5808	res = optimize_node(res);
5809	irn_verify_irg(res, irg);
5810
5811	return res;
5812}
5813
5814/**
5815 * construct fneg node
5816 */
5817ir_node *new_bd_sparc_fneg_d(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
5818{
5819	ir_graph         *irg        = get_irn_irg(block);
5820	ir_op            *op         = op_sparc_fneg;
5821	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5822	ir_node          *res;
5823	backend_info_t   *info;
5824	int             arity   = 1;
5825	ir_node        *in[1];
5826	int             n_res   = 1;
5827	ir_mode        *mode    = mode_D;
5828	static const arch_register_req_t *in_reqs[] =
5829	{
5830		& sparc_requirements_fp_fp_a_2,
5831	};
5832
5833	/* construct in array */
5834	in[0] = val;
5835
5836	/* flags */
5837	irn_flags_ |= arch_irn_flags_rematerializable;
5838
5839	/* create node */
5840	assert(op != NULL);
5841	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5842
5843	/* init node attributes */
5844		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5845	init_sparc_fp_attributes(res, fp_mode);
5846
5847
5848	info = be_get_info(res);
5849	(void) info; /* avoid potential warning */
5850	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
5851
5852
5853	/* optimize node */
5854	res = optimize_node(res);
5855	irn_verify_irg(res, irg);
5856
5857	return res;
5858}
5859
5860/**
5861 * construct fneg node
5862 */
5863ir_node *new_bd_sparc_fneg_s(dbg_info *dbgi, ir_node *block, ir_node *val, ir_mode *fp_mode)
5864{
5865	ir_graph         *irg        = get_irn_irg(block);
5866	ir_op            *op         = op_sparc_fneg;
5867	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5868	ir_node          *res;
5869	backend_info_t   *info;
5870	int             arity   = 1;
5871	ir_node        *in[1];
5872	int             n_res   = 1;
5873	ir_mode        *mode    = mode_F;
5874	static const arch_register_req_t *in_reqs[] =
5875	{
5876		& sparc_requirements_fp_fp,
5877	};
5878
5879	/* construct in array */
5880	in[0] = val;
5881
5882	/* flags */
5883	irn_flags_ |= arch_irn_flags_rematerializable;
5884
5885	/* create node */
5886	assert(op != NULL);
5887	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5888
5889	/* init node attributes */
5890		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5891	init_sparc_fp_attributes(res, fp_mode);
5892
5893
5894	info = be_get_info(res);
5895	(void) info; /* avoid potential warning */
5896	info->out_infos[0].req = &sparc_requirements_fp_fp;
5897
5898
5899	/* optimize node */
5900	res = optimize_node(res);
5901	irn_verify_irg(res, irg);
5902
5903	return res;
5904}
5905
5906/**
5907 * construct fsub node
5908 */
5909ir_node *new_bd_sparc_fsub_q(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
5910{
5911	ir_graph         *irg        = get_irn_irg(block);
5912	ir_op            *op         = op_sparc_fsub;
5913	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5914	ir_node          *res;
5915	backend_info_t   *info;
5916	int             arity   = 2;
5917	ir_node        *in[2];
5918	int             n_res   = 1;
5919	ir_mode        *mode    = mode_Q;
5920	static const arch_register_req_t *in_reqs[] =
5921	{
5922		& sparc_requirements_fp_fp_a_4,
5923		& sparc_requirements_fp_fp_a_4,
5924	};
5925
5926	/* construct in array */
5927	in[0] = left;
5928	in[1] = right;
5929
5930	/* flags */
5931	irn_flags_ |= arch_irn_flags_rematerializable;
5932
5933	/* create node */
5934	assert(op != NULL);
5935	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5936
5937	/* init node attributes */
5938		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5939	init_sparc_fp_attributes(res, fp_mode);
5940
5941
5942	info = be_get_info(res);
5943	(void) info; /* avoid potential warning */
5944	info->out_infos[0].req = &sparc_requirements_fp_fp_a_4;
5945
5946
5947	/* optimize node */
5948	res = optimize_node(res);
5949	irn_verify_irg(res, irg);
5950
5951	return res;
5952}
5953
5954/**
5955 * construct fsub node
5956 */
5957ir_node *new_bd_sparc_fsub_d(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
5958{
5959	ir_graph         *irg        = get_irn_irg(block);
5960	ir_op            *op         = op_sparc_fsub;
5961	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
5962	ir_node          *res;
5963	backend_info_t   *info;
5964	int             arity   = 2;
5965	ir_node        *in[2];
5966	int             n_res   = 1;
5967	ir_mode        *mode    = mode_D;
5968	static const arch_register_req_t *in_reqs[] =
5969	{
5970		& sparc_requirements_fp_fp_a_2,
5971		& sparc_requirements_fp_fp_a_2,
5972	};
5973
5974	/* construct in array */
5975	in[0] = left;
5976	in[1] = right;
5977
5978	/* flags */
5979	irn_flags_ |= arch_irn_flags_rematerializable;
5980
5981	/* create node */
5982	assert(op != NULL);
5983	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
5984
5985	/* init node attributes */
5986		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
5987	init_sparc_fp_attributes(res, fp_mode);
5988
5989
5990	info = be_get_info(res);
5991	(void) info; /* avoid potential warning */
5992	info->out_infos[0].req = &sparc_requirements_fp_fp_a_2;
5993
5994
5995	/* optimize node */
5996	res = optimize_node(res);
5997	irn_verify_irg(res, irg);
5998
5999	return res;
6000}
6001
6002/**
6003 * construct fsub node
6004 */
6005ir_node *new_bd_sparc_fsub_s(dbg_info *dbgi, ir_node *block, ir_node *left, ir_node *right, ir_mode *fp_mode)
6006{
6007	ir_graph         *irg        = get_irn_irg(block);
6008	ir_op            *op         = op_sparc_fsub;
6009	arch_irn_flags_t  irn_flags_ = arch_irn_flags_none;
6010	ir_node          *res;
6011	backend_info_t   *info;
6012	int             arity   = 2;
6013	ir_node        *in[2];
6014	int             n_res   = 1;
6015	ir_mode        *mode    = mode_F;
6016	static const arch_register_req_t *in_reqs[] =
6017	{
6018		& sparc_requirements_fp_fp,
6019		& sparc_requirements_fp_fp,
6020	};
6021
6022	/* construct in array */
6023	in[0] = left;
6024	in[1] = right;
6025
6026	/* flags */
6027	irn_flags_ |= arch_irn_flags_rematerializable;
6028
6029	/* create node */
6030	assert(op != NULL);
6031	res = new_ir_node(dbgi, irg, block, op, mode, arity, in);
6032
6033	/* init node attributes */
6034		init_sparc_attributes(res, irn_flags_, in_reqs, n_res);
6035	init_sparc_fp_attributes(res, fp_mode);
6036
6037
6038	info = be_get_info(res);
6039	(void) info; /* avoid potential warning */
6040	info->out_infos[0].req = &sparc_requirements_fp_fp;
6041
6042
6043	/* optimize node */
6044	res = optimize_node(res);
6045	irn_verify_irg(res, irg);
6046
6047	return res;
6048}
6049
6050
6051
6052/**
6053 * Creates the sparc specific Firm machine operations
6054 * needed for the assembler irgs.
6055 */
6056void sparc_create_opcodes(const arch_irn_ops_t *be_ops)
6057{
6058	ir_op *op;
6059	int    cur_opcode = get_next_ir_opcodes(iro_sparc_last);
6060
6061	sparc_opcode_start = cur_opcode;
6062	op = new_ir_op(cur_opcode + iro_sparc_SubCCZero, "sparc_SubCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6063	op->ops.be_ops        = be_ops;
6064	op->ops.dump_node     = sparc_dump_node;
6065	op->ops.node_cmp_attr = cmp_attr_sparc;
6066	op->ops.copy_attr     = sparc_copy_attr;
6067	set_op_tag(op, sparc_op_tag);
6068	op_sparc_SubCCZero = op;
6069	op = new_ir_op(cur_opcode + iro_sparc_Sra, "sparc_Sra", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6070	op->ops.be_ops        = be_ops;
6071	op->ops.dump_node     = sparc_dump_node;
6072	op->ops.node_cmp_attr = cmp_attr_sparc;
6073	op->ops.copy_attr     = sparc_copy_attr;
6074	set_op_tag(op, sparc_op_tag);
6075	op_sparc_Sra = op;
6076	op = new_ir_op(cur_opcode + iro_sparc_Ld, "sparc_Ld", op_pin_state_exc_pinned, irop_flag_uses_memory, oparity_binary, 0, sizeof(sparc_load_store_attr_t));
6077	op->ops.be_ops        = be_ops;
6078	op->ops.dump_node     = sparc_dump_node;
6079	op->ops.node_cmp_attr = cmp_attr_sparc_load_store;
6080	op->ops.copy_attr     = sparc_copy_attr;
6081	set_op_tag(op, sparc_op_tag);
6082	op_sparc_Ld = op;
6083	op = new_ir_op(cur_opcode + iro_sparc_fitof, "sparc_fitof", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_fp_attr_t));
6084	op->ops.be_ops        = be_ops;
6085	op->ops.dump_node     = sparc_dump_node;
6086	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6087	op->ops.copy_attr     = sparc_copy_attr;
6088	set_op_tag(op, sparc_op_tag);
6089	op_sparc_fitof = op;
6090	op = new_ir_op(cur_opcode + iro_sparc_fadd, "sparc_fadd", op_pin_state_floats, irop_flag_commutative, oparity_binary, 0, sizeof(sparc_fp_attr_t));
6091	op->ops.be_ops        = be_ops;
6092	op->ops.dump_node     = sparc_dump_node;
6093	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6094	op->ops.copy_attr     = sparc_copy_attr;
6095	set_op_tag(op, sparc_op_tag);
6096	op_sparc_fadd = op;
6097	op = new_ir_op(cur_opcode + iro_sparc_Start, "sparc_Start", op_pin_state_pinned, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6098	op->ops.be_ops        = be_ops;
6099	op->ops.dump_node     = sparc_dump_node;
6100	op->ops.node_cmp_attr = cmp_attr_sparc;
6101	op->ops.copy_attr     = sparc_copy_attr;
6102	set_op_tag(op, sparc_op_tag);
6103	op_sparc_Start = op;
6104	op = new_ir_op(cur_opcode + iro_sparc_RestoreZero, "sparc_RestoreZero", op_pin_state_floats, irop_flag_none, oparity_binary, 0, sizeof(sparc_attr_t));
6105	op->ops.be_ops        = be_ops;
6106	op->ops.dump_node     = sparc_dump_node;
6107	op->ops.node_cmp_attr = cmp_attr_sparc;
6108	op->ops.copy_attr     = sparc_copy_attr;
6109	set_op_tag(op, sparc_op_tag);
6110	op_sparc_RestoreZero = op;
6111	op = new_ir_op(cur_opcode + iro_sparc_SetHi, "sparc_SetHi", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6112	op->ops.be_ops        = be_ops;
6113	op->ops.dump_node     = sparc_dump_node;
6114	op->ops.node_cmp_attr = cmp_attr_sparc;
6115	op->ops.copy_attr     = sparc_copy_attr;
6116	set_op_tag(op, sparc_op_tag);
6117	op_sparc_SetHi = op;
6118	op = new_ir_op(cur_opcode + iro_sparc_Xor, "sparc_Xor", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6119	op->ops.be_ops        = be_ops;
6120	op->ops.dump_node     = sparc_dump_node;
6121	op->ops.node_cmp_attr = cmp_attr_sparc;
6122	op->ops.copy_attr     = sparc_copy_attr;
6123	set_op_tag(op, sparc_op_tag);
6124	op_sparc_Xor = op;
6125	op = new_ir_op(cur_opcode + iro_sparc_Or, "sparc_Or", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6126	op->ops.be_ops        = be_ops;
6127	op->ops.dump_node     = sparc_dump_node;
6128	op->ops.node_cmp_attr = cmp_attr_sparc;
6129	op->ops.copy_attr     = sparc_copy_attr;
6130	set_op_tag(op, sparc_op_tag);
6131	op_sparc_Or = op;
6132	op = new_ir_op(cur_opcode + iro_sparc_Restore, "sparc_Restore", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6133	op->ops.be_ops        = be_ops;
6134	op->ops.dump_node     = sparc_dump_node;
6135	op->ops.node_cmp_attr = cmp_attr_sparc;
6136	op->ops.copy_attr     = sparc_copy_attr;
6137	set_op_tag(op, sparc_op_tag);
6138	op_sparc_Restore = op;
6139	op = new_ir_op(cur_opcode + iro_sparc_SubX_t, "sparc_SubX_t", op_pin_state_floats, irop_flag_none, oparity_trinary, 0, 0);
6140	op->ops.be_ops        = be_ops;
6141	op->ops.dump_node     = NULL;
6142	op->ops.node_cmp_attr = NULL;
6143	set_op_tag(op, sparc_op_tag);
6144	op_sparc_SubX_t = op;
6145	op = new_ir_op(cur_opcode + iro_sparc_UMulh, "sparc_UMulh", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6146	op->ops.be_ops        = be_ops;
6147	op->ops.dump_node     = sparc_dump_node;
6148	op->ops.node_cmp_attr = cmp_attr_sparc;
6149	op->ops.copy_attr     = sparc_copy_attr;
6150	set_op_tag(op, sparc_op_tag);
6151	op_sparc_UMulh = op;
6152	op = new_ir_op(cur_opcode + iro_sparc_Ba, "sparc_Ba", op_pin_state_pinned, irop_flag_cfopcode, oparity_zero, 0, sizeof(sparc_attr_t));
6153	op->ops.be_ops        = be_ops;
6154	op->ops.dump_node     = sparc_dump_node;
6155	op->ops.node_cmp_attr = cmp_attr_sparc;
6156	op->ops.copy_attr     = sparc_copy_attr;
6157	set_op_tag(op, sparc_op_tag);
6158	op_sparc_Ba = op;
6159	op = new_ir_op(cur_opcode + iro_sparc_Cmp, "sparc_Cmp", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6160	op->ops.be_ops        = be_ops;
6161	op->ops.dump_node     = sparc_dump_node;
6162	op->ops.node_cmp_attr = cmp_attr_sparc;
6163	op->ops.copy_attr     = sparc_copy_attr;
6164	set_op_tag(op, sparc_op_tag);
6165	op_sparc_Cmp = op;
6166	op = new_ir_op(cur_opcode + iro_sparc_fftof, "sparc_fftof", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_fp_conv_attr_t));
6167	op->ops.be_ops        = be_ops;
6168	op->ops.dump_node     = sparc_dump_node;
6169	op->ops.node_cmp_attr = cmp_attr_sparc_fp_conv;
6170	op->ops.copy_attr     = sparc_copy_attr;
6171	set_op_tag(op, sparc_op_tag);
6172	op_sparc_fftof = op;
6173	op = new_ir_op(cur_opcode + iro_sparc_XNorCCZero, "sparc_XNorCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6174	op->ops.be_ops        = be_ops;
6175	op->ops.dump_node     = sparc_dump_node;
6176	op->ops.node_cmp_attr = cmp_attr_sparc;
6177	op->ops.copy_attr     = sparc_copy_attr;
6178	set_op_tag(op, sparc_op_tag);
6179	op_sparc_XNorCCZero = op;
6180	op = new_ir_op(cur_opcode + iro_sparc_Call, "sparc_Call", op_pin_state_exc_pinned, irop_flag_none, oparity_variable, 0, sizeof(sparc_attr_t));
6181	op->ops.be_ops        = be_ops;
6182	op->ops.dump_node     = sparc_dump_node;
6183	op->ops.node_cmp_attr = cmp_attr_sparc;
6184	op->ops.copy_attr     = sparc_copy_attr;
6185	set_op_tag(op, sparc_op_tag);
6186	op_sparc_Call = op;
6187	op = new_ir_op(cur_opcode + iro_sparc_AddX, "sparc_AddX", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6188	op->ops.be_ops        = be_ops;
6189	op->ops.dump_node     = sparc_dump_node;
6190	op->ops.node_cmp_attr = cmp_attr_sparc;
6191	op->ops.copy_attr     = sparc_copy_attr;
6192	set_op_tag(op, sparc_op_tag);
6193	op_sparc_AddX = op;
6194	op = new_ir_op(cur_opcode + iro_sparc_SubSP, "sparc_SubSP", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6195	op->ops.be_ops        = be_ops;
6196	op->ops.dump_node     = sparc_dump_node;
6197	op->ops.node_cmp_attr = cmp_attr_sparc;
6198	op->ops.copy_attr     = sparc_copy_attr;
6199	set_op_tag(op, sparc_op_tag);
6200	op_sparc_SubSP = op;
6201	op = new_ir_op(cur_opcode + iro_sparc_Add, "sparc_Add", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6202	op->ops.be_ops        = be_ops;
6203	op->ops.dump_node     = sparc_dump_node;
6204	op->ops.node_cmp_attr = cmp_attr_sparc;
6205	op->ops.copy_attr     = sparc_copy_attr;
6206	set_op_tag(op, sparc_op_tag);
6207	op_sparc_Add = op;
6208	op = new_ir_op(cur_opcode + iro_sparc_SubCC, "sparc_SubCC", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6209	op->ops.be_ops        = be_ops;
6210	op->ops.dump_node     = sparc_dump_node;
6211	op->ops.node_cmp_attr = cmp_attr_sparc;
6212	op->ops.copy_attr     = sparc_copy_attr;
6213	set_op_tag(op, sparc_op_tag);
6214	op_sparc_SubCC = op;
6215	op = new_ir_op(cur_opcode + iro_sparc_Ldf, "sparc_Ldf", op_pin_state_exc_pinned, irop_flag_uses_memory, oparity_binary, 0, sizeof(sparc_load_store_attr_t));
6216	op->ops.be_ops        = be_ops;
6217	op->ops.dump_node     = sparc_dump_node;
6218	op->ops.node_cmp_attr = cmp_attr_sparc_load_store;
6219	op->ops.copy_attr     = sparc_copy_attr;
6220	set_op_tag(op, sparc_op_tag);
6221	op_sparc_Ldf = op;
6222	op = new_ir_op(cur_opcode + iro_sparc_fdiv, "sparc_fdiv", op_pin_state_floats, irop_flag_none, oparity_binary, 0, sizeof(sparc_fp_attr_t));
6223	op->ops.be_ops        = be_ops;
6224	op->ops.dump_node     = sparc_dump_node;
6225	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6226	op->ops.copy_attr     = sparc_copy_attr;
6227	set_op_tag(op, sparc_op_tag);
6228	op_sparc_fdiv = op;
6229	op = new_ir_op(cur_opcode + iro_sparc_AndN, "sparc_AndN", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6230	op->ops.be_ops        = be_ops;
6231	op->ops.dump_node     = sparc_dump_node;
6232	op->ops.node_cmp_attr = cmp_attr_sparc;
6233	op->ops.copy_attr     = sparc_copy_attr;
6234	set_op_tag(op, sparc_op_tag);
6235	op_sparc_AndN = op;
6236	op = new_ir_op(cur_opcode + iro_sparc_fftoi, "sparc_fftoi", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_fp_attr_t));
6237	op->ops.be_ops        = be_ops;
6238	op->ops.dump_node     = sparc_dump_node;
6239	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6240	op->ops.copy_attr     = sparc_copy_attr;
6241	set_op_tag(op, sparc_op_tag);
6242	op_sparc_fftoi = op;
6243	op = new_ir_op(cur_opcode + iro_sparc_XorCCZero, "sparc_XorCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6244	op->ops.be_ops        = be_ops;
6245	op->ops.dump_node     = sparc_dump_node;
6246	op->ops.node_cmp_attr = cmp_attr_sparc;
6247	op->ops.copy_attr     = sparc_copy_attr;
6248	set_op_tag(op, sparc_op_tag);
6249	op_sparc_XorCCZero = op;
6250	op = new_ir_op(cur_opcode + iro_sparc_St, "sparc_St", op_pin_state_exc_pinned, irop_flag_uses_memory, oparity_trinary, 0, sizeof(sparc_load_store_attr_t));
6251	op->ops.be_ops        = be_ops;
6252	op->ops.dump_node     = sparc_dump_node;
6253	op->ops.node_cmp_attr = cmp_attr_sparc_load_store;
6254	op->ops.copy_attr     = sparc_copy_attr;
6255	set_op_tag(op, sparc_op_tag);
6256	op_sparc_St = op;
6257	op = new_ir_op(cur_opcode + iro_sparc_MulCCZero, "sparc_MulCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6258	op->ops.be_ops        = be_ops;
6259	op->ops.dump_node     = sparc_dump_node;
6260	op->ops.node_cmp_attr = cmp_attr_sparc;
6261	op->ops.copy_attr     = sparc_copy_attr;
6262	set_op_tag(op, sparc_op_tag);
6263	op_sparc_MulCCZero = op;
6264	op = new_ir_op(cur_opcode + iro_sparc_Save, "sparc_Save", op_pin_state_floats, irop_flag_none, oparity_unary, 0, sizeof(sparc_attr_t));
6265	op->ops.be_ops        = be_ops;
6266	op->ops.dump_node     = sparc_dump_node;
6267	op->ops.node_cmp_attr = cmp_attr_sparc;
6268	op->ops.copy_attr     = sparc_copy_attr;
6269	set_op_tag(op, sparc_op_tag);
6270	op_sparc_Save = op;
6271	op = new_ir_op(cur_opcode + iro_sparc_fbfcc, "sparc_fbfcc", op_pin_state_pinned, irop_flag_cfopcode|irop_flag_forking, oparity_unary, 0, sizeof(sparc_jmp_cond_attr_t));
6272	op->ops.be_ops        = be_ops;
6273	op->ops.dump_node     = sparc_dump_node;
6274	op->ops.node_cmp_attr = cmp_attr_sparc_jmp_cond;
6275	op->ops.copy_attr     = sparc_copy_attr;
6276	set_op_tag(op, sparc_op_tag);
6277	op_sparc_fbfcc = op;
6278	op = new_ir_op(cur_opcode + iro_sparc_Sub, "sparc_Sub", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6279	op->ops.be_ops        = be_ops;
6280	op->ops.dump_node     = sparc_dump_node;
6281	op->ops.node_cmp_attr = cmp_attr_sparc;
6282	op->ops.copy_attr     = sparc_copy_attr;
6283	set_op_tag(op, sparc_op_tag);
6284	op_sparc_Sub = op;
6285	op = new_ir_op(cur_opcode + iro_sparc_Mul, "sparc_Mul", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6286	op->ops.be_ops        = be_ops;
6287	op->ops.dump_node     = sparc_dump_node;
6288	op->ops.node_cmp_attr = cmp_attr_sparc;
6289	op->ops.copy_attr     = sparc_copy_attr;
6290	set_op_tag(op, sparc_op_tag);
6291	op_sparc_Mul = op;
6292	op = new_ir_op(cur_opcode + iro_sparc_SubCC_t, "sparc_SubCC_t", op_pin_state_floats, irop_flag_none, oparity_binary, 0, 0);
6293	op->ops.be_ops        = be_ops;
6294	op->ops.dump_node     = NULL;
6295	op->ops.node_cmp_attr = NULL;
6296	set_op_tag(op, sparc_op_tag);
6297	op_sparc_SubCC_t = op;
6298	op = new_ir_op(cur_opcode + iro_sparc_Stf, "sparc_Stf", op_pin_state_exc_pinned, irop_flag_uses_memory, oparity_trinary, 0, sizeof(sparc_load_store_attr_t));
6299	op->ops.be_ops        = be_ops;
6300	op->ops.dump_node     = sparc_dump_node;
6301	op->ops.node_cmp_attr = cmp_attr_sparc_load_store;
6302	op->ops.copy_attr     = sparc_copy_attr;
6303	set_op_tag(op, sparc_op_tag);
6304	op_sparc_Stf = op;
6305	op = new_ir_op(cur_opcode + iro_sparc_SDiv, "sparc_SDiv", op_pin_state_exc_pinned, irop_flag_none, oparity_trinary, 0, sizeof(sparc_attr_t));
6306	op->ops.be_ops        = be_ops;
6307	op->ops.dump_node     = sparc_dump_node;
6308	op->ops.node_cmp_attr = cmp_attr_sparc;
6309	op->ops.copy_attr     = sparc_copy_attr;
6310	set_op_tag(op, sparc_op_tag);
6311	op_sparc_SDiv = op;
6312	op = new_ir_op(cur_opcode + iro_sparc_AddX_t, "sparc_AddX_t", op_pin_state_floats, irop_flag_none, oparity_trinary, 0, 0);
6313	op->ops.be_ops        = be_ops;
6314	op->ops.dump_node     = NULL;
6315	op->ops.node_cmp_attr = NULL;
6316	set_op_tag(op, sparc_op_tag);
6317	op_sparc_AddX_t = op;
6318	op = new_ir_op(cur_opcode + iro_sparc_fabs, "sparc_fabs", op_pin_state_floats, irop_flag_none, oparity_unary, 0, sizeof(sparc_fp_attr_t));
6319	op->ops.be_ops        = be_ops;
6320	op->ops.dump_node     = sparc_dump_node;
6321	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6322	op->ops.copy_attr     = sparc_copy_attr;
6323	set_op_tag(op, sparc_op_tag);
6324	op_sparc_fabs = op;
6325	op = new_ir_op(cur_opcode + iro_sparc_AddCC, "sparc_AddCC", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6326	op->ops.be_ops        = be_ops;
6327	op->ops.dump_node     = sparc_dump_node;
6328	op->ops.node_cmp_attr = cmp_attr_sparc;
6329	op->ops.copy_attr     = sparc_copy_attr;
6330	set_op_tag(op, sparc_op_tag);
6331	op_sparc_AddCC = op;
6332	op = new_ir_op(cur_opcode + iro_sparc_Bicc, "sparc_Bicc", op_pin_state_pinned, irop_flag_cfopcode|irop_flag_forking, oparity_unary, 0, sizeof(sparc_jmp_cond_attr_t));
6333	op->ops.be_ops        = be_ops;
6334	op->ops.dump_node     = sparc_dump_node;
6335	op->ops.node_cmp_attr = cmp_attr_sparc_jmp_cond;
6336	op->ops.copy_attr     = sparc_copy_attr;
6337	set_op_tag(op, sparc_op_tag);
6338	op_sparc_Bicc = op;
6339	op = new_ir_op(cur_opcode + iro_sparc_OrN, "sparc_OrN", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6340	op->ops.be_ops        = be_ops;
6341	op->ops.dump_node     = sparc_dump_node;
6342	op->ops.node_cmp_attr = cmp_attr_sparc;
6343	op->ops.copy_attr     = sparc_copy_attr;
6344	set_op_tag(op, sparc_op_tag);
6345	op_sparc_OrN = op;
6346	op = new_ir_op(cur_opcode + iro_sparc_SubX, "sparc_SubX", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6347	op->ops.be_ops        = be_ops;
6348	op->ops.dump_node     = sparc_dump_node;
6349	op->ops.node_cmp_attr = cmp_attr_sparc;
6350	op->ops.copy_attr     = sparc_copy_attr;
6351	set_op_tag(op, sparc_op_tag);
6352	op_sparc_SubX = op;
6353	op = new_ir_op(cur_opcode + iro_sparc_fcmp, "sparc_fcmp", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_fp_attr_t));
6354	op->ops.be_ops        = be_ops;
6355	op->ops.dump_node     = sparc_dump_node;
6356	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6357	op->ops.copy_attr     = sparc_copy_attr;
6358	set_op_tag(op, sparc_op_tag);
6359	op_sparc_fcmp = op;
6360	op = new_ir_op(cur_opcode + iro_sparc_OrCCZero, "sparc_OrCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6361	op->ops.be_ops        = be_ops;
6362	op->ops.dump_node     = sparc_dump_node;
6363	op->ops.node_cmp_attr = cmp_attr_sparc;
6364	op->ops.copy_attr     = sparc_copy_attr;
6365	set_op_tag(op, sparc_op_tag);
6366	op_sparc_OrCCZero = op;
6367	op = new_ir_op(cur_opcode + iro_sparc_AddSP, "sparc_AddSP", op_pin_state_floats, irop_flag_none, oparity_binary, 0, sizeof(sparc_attr_t));
6368	op->ops.be_ops        = be_ops;
6369	op->ops.dump_node     = sparc_dump_node;
6370	op->ops.node_cmp_attr = cmp_attr_sparc;
6371	op->ops.copy_attr     = sparc_copy_attr;
6372	set_op_tag(op, sparc_op_tag);
6373	op_sparc_AddSP = op;
6374	op = new_ir_op(cur_opcode + iro_sparc_SMulh, "sparc_SMulh", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6375	op->ops.be_ops        = be_ops;
6376	op->ops.dump_node     = sparc_dump_node;
6377	op->ops.node_cmp_attr = cmp_attr_sparc;
6378	op->ops.copy_attr     = sparc_copy_attr;
6379	set_op_tag(op, sparc_op_tag);
6380	op_sparc_SMulh = op;
6381	op = new_ir_op(cur_opcode + iro_sparc_AddCC_t, "sparc_AddCC_t", op_pin_state_floats, irop_flag_none, oparity_binary, 0, 0);
6382	op->ops.be_ops        = be_ops;
6383	op->ops.dump_node     = NULL;
6384	op->ops.node_cmp_attr = NULL;
6385	set_op_tag(op, sparc_op_tag);
6386	op_sparc_AddCC_t = op;
6387	op = new_ir_op(cur_opcode + iro_sparc_Return, "sparc_Return", op_pin_state_pinned, irop_flag_cfopcode, oparity_variable, 0, sizeof(sparc_attr_t));
6388	op->ops.be_ops        = be_ops;
6389	op->ops.dump_node     = sparc_dump_node;
6390	op->ops.node_cmp_attr = cmp_attr_sparc;
6391	op->ops.copy_attr     = sparc_copy_attr;
6392	set_op_tag(op, sparc_op_tag);
6393	op_sparc_Return = op;
6394	op = new_ir_op(cur_opcode + iro_sparc_XNor, "sparc_XNor", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6395	op->ops.be_ops        = be_ops;
6396	op->ops.dump_node     = sparc_dump_node;
6397	op->ops.node_cmp_attr = cmp_attr_sparc;
6398	op->ops.copy_attr     = sparc_copy_attr;
6399	set_op_tag(op, sparc_op_tag);
6400	op_sparc_XNor = op;
6401	op = new_ir_op(cur_opcode + iro_sparc_AndNCCZero, "sparc_AndNCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6402	op->ops.be_ops        = be_ops;
6403	op->ops.dump_node     = sparc_dump_node;
6404	op->ops.node_cmp_attr = cmp_attr_sparc;
6405	op->ops.copy_attr     = sparc_copy_attr;
6406	set_op_tag(op, sparc_op_tag);
6407	op_sparc_AndNCCZero = op;
6408	op = new_ir_op(cur_opcode + iro_sparc_AndCCZero, "sparc_AndCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6409	op->ops.be_ops        = be_ops;
6410	op->ops.dump_node     = sparc_dump_node;
6411	op->ops.node_cmp_attr = cmp_attr_sparc;
6412	op->ops.copy_attr     = sparc_copy_attr;
6413	set_op_tag(op, sparc_op_tag);
6414	op_sparc_AndCCZero = op;
6415	op = new_ir_op(cur_opcode + iro_sparc_FrameAddr, "sparc_FrameAddr", op_pin_state_floats, irop_flag_constlike, oparity_unary, 0, sizeof(sparc_attr_t));
6416	op->ops.be_ops        = be_ops;
6417	op->ops.dump_node     = sparc_dump_node;
6418	op->ops.node_cmp_attr = cmp_attr_sparc;
6419	op->ops.copy_attr     = sparc_copy_attr;
6420	set_op_tag(op, sparc_op_tag);
6421	op_sparc_FrameAddr = op;
6422	op = new_ir_op(cur_opcode + iro_sparc_OrNCCZero, "sparc_OrNCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6423	op->ops.be_ops        = be_ops;
6424	op->ops.dump_node     = sparc_dump_node;
6425	op->ops.node_cmp_attr = cmp_attr_sparc;
6426	op->ops.copy_attr     = sparc_copy_attr;
6427	set_op_tag(op, sparc_op_tag);
6428	op_sparc_OrNCCZero = op;
6429	op = new_ir_op(cur_opcode + iro_sparc_And, "sparc_And", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6430	op->ops.be_ops        = be_ops;
6431	op->ops.dump_node     = sparc_dump_node;
6432	op->ops.node_cmp_attr = cmp_attr_sparc;
6433	op->ops.copy_attr     = sparc_copy_attr;
6434	set_op_tag(op, sparc_op_tag);
6435	op_sparc_And = op;
6436	op = new_ir_op(cur_opcode + iro_sparc_fmul, "sparc_fmul", op_pin_state_floats, irop_flag_commutative, oparity_binary, 0, sizeof(sparc_fp_attr_t));
6437	op->ops.be_ops        = be_ops;
6438	op->ops.dump_node     = sparc_dump_node;
6439	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6440	op->ops.copy_attr     = sparc_copy_attr;
6441	set_op_tag(op, sparc_op_tag);
6442	op_sparc_fmul = op;
6443	op = new_ir_op(cur_opcode + iro_sparc_AddCCZero, "sparc_AddCCZero", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6444	op->ops.be_ops        = be_ops;
6445	op->ops.dump_node     = sparc_dump_node;
6446	op->ops.node_cmp_attr = cmp_attr_sparc;
6447	op->ops.copy_attr     = sparc_copy_attr;
6448	set_op_tag(op, sparc_op_tag);
6449	op_sparc_AddCCZero = op;
6450	op = new_ir_op(cur_opcode + iro_sparc_UDiv, "sparc_UDiv", op_pin_state_exc_pinned, irop_flag_none, oparity_trinary, 0, sizeof(sparc_attr_t));
6451	op->ops.be_ops        = be_ops;
6452	op->ops.dump_node     = sparc_dump_node;
6453	op->ops.node_cmp_attr = cmp_attr_sparc;
6454	op->ops.copy_attr     = sparc_copy_attr;
6455	set_op_tag(op, sparc_op_tag);
6456	op_sparc_UDiv = op;
6457	op = new_ir_op(cur_opcode + iro_sparc_Sll, "sparc_Sll", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6458	op->ops.be_ops        = be_ops;
6459	op->ops.dump_node     = sparc_dump_node;
6460	op->ops.node_cmp_attr = cmp_attr_sparc;
6461	op->ops.copy_attr     = sparc_copy_attr;
6462	set_op_tag(op, sparc_op_tag);
6463	op_sparc_Sll = op;
6464	op = new_ir_op(cur_opcode + iro_sparc_SwitchJmp, "sparc_SwitchJmp", op_pin_state_pinned, irop_flag_cfopcode|irop_flag_forking, oparity_unary, 0, sizeof(sparc_switch_jmp_attr_t));
6465	op->ops.be_ops        = be_ops;
6466	op->ops.dump_node     = sparc_dump_node;
6467	op->ops.node_cmp_attr = cmp_attr_sparc;
6468	op->ops.copy_attr     = sparc_copy_attr;
6469	set_op_tag(op, sparc_op_tag);
6470	op_sparc_SwitchJmp = op;
6471	op = new_ir_op(cur_opcode + iro_sparc_Srl, "sparc_Srl", op_pin_state_floats, irop_flag_none, oparity_zero, 0, sizeof(sparc_attr_t));
6472	op->ops.be_ops        = be_ops;
6473	op->ops.dump_node     = sparc_dump_node;
6474	op->ops.node_cmp_attr = cmp_attr_sparc;
6475	op->ops.copy_attr     = sparc_copy_attr;
6476	set_op_tag(op, sparc_op_tag);
6477	op_sparc_Srl = op;
6478	op = new_ir_op(cur_opcode + iro_sparc_fneg, "sparc_fneg", op_pin_state_floats, irop_flag_none, oparity_unary, 0, sizeof(sparc_fp_attr_t));
6479	op->ops.be_ops        = be_ops;
6480	op->ops.dump_node     = sparc_dump_node;
6481	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6482	op->ops.copy_attr     = sparc_copy_attr;
6483	set_op_tag(op, sparc_op_tag);
6484	op_sparc_fneg = op;
6485	op = new_ir_op(cur_opcode + iro_sparc_fsub, "sparc_fsub", op_pin_state_floats, irop_flag_none, oparity_binary, 0, sizeof(sparc_fp_attr_t));
6486	op->ops.be_ops        = be_ops;
6487	op->ops.dump_node     = sparc_dump_node;
6488	op->ops.node_cmp_attr = cmp_attr_sparc_fp;
6489	op->ops.copy_attr     = sparc_copy_attr;
6490	set_op_tag(op, sparc_op_tag);
6491	op_sparc_fsub = op;
6492
6493	sparc_opcode_end = cur_opcode + iro_sparc_last;
6494}
6495
6496void sparc_free_opcodes(void)
6497{
6498	free_ir_op(op_sparc_SubCCZero); op_sparc_SubCCZero = NULL;
6499	free_ir_op(op_sparc_Sra); op_sparc_Sra = NULL;
6500	free_ir_op(op_sparc_Ld); op_sparc_Ld = NULL;
6501	free_ir_op(op_sparc_fitof); op_sparc_fitof = NULL;
6502	free_ir_op(op_sparc_fadd); op_sparc_fadd = NULL;
6503	free_ir_op(op_sparc_Start); op_sparc_Start = NULL;
6504	free_ir_op(op_sparc_RestoreZero); op_sparc_RestoreZero = NULL;
6505	free_ir_op(op_sparc_SetHi); op_sparc_SetHi = NULL;
6506	free_ir_op(op_sparc_Xor); op_sparc_Xor = NULL;
6507	free_ir_op(op_sparc_Or); op_sparc_Or = NULL;
6508	free_ir_op(op_sparc_Restore); op_sparc_Restore = NULL;
6509	free_ir_op(op_sparc_SubX_t); op_sparc_SubX_t = NULL;
6510	free_ir_op(op_sparc_UMulh); op_sparc_UMulh = NULL;
6511	free_ir_op(op_sparc_Ba); op_sparc_Ba = NULL;
6512	free_ir_op(op_sparc_Cmp); op_sparc_Cmp = NULL;
6513	free_ir_op(op_sparc_fftof); op_sparc_fftof = NULL;
6514	free_ir_op(op_sparc_XNorCCZero); op_sparc_XNorCCZero = NULL;
6515	free_ir_op(op_sparc_Call); op_sparc_Call = NULL;
6516	free_ir_op(op_sparc_AddX); op_sparc_AddX = NULL;
6517	free_ir_op(op_sparc_SubSP); op_sparc_SubSP = NULL;
6518	free_ir_op(op_sparc_Add); op_sparc_Add = NULL;
6519	free_ir_op(op_sparc_SubCC); op_sparc_SubCC = NULL;
6520	free_ir_op(op_sparc_Ldf); op_sparc_Ldf = NULL;
6521	free_ir_op(op_sparc_fdiv); op_sparc_fdiv = NULL;
6522	free_ir_op(op_sparc_AndN); op_sparc_AndN = NULL;
6523	free_ir_op(op_sparc_fftoi); op_sparc_fftoi = NULL;
6524	free_ir_op(op_sparc_XorCCZero); op_sparc_XorCCZero = NULL;
6525	free_ir_op(op_sparc_St); op_sparc_St = NULL;
6526	free_ir_op(op_sparc_MulCCZero); op_sparc_MulCCZero = NULL;
6527	free_ir_op(op_sparc_Save); op_sparc_Save = NULL;
6528	free_ir_op(op_sparc_fbfcc); op_sparc_fbfcc = NULL;
6529	free_ir_op(op_sparc_Sub); op_sparc_Sub = NULL;
6530	free_ir_op(op_sparc_Mul); op_sparc_Mul = NULL;
6531	free_ir_op(op_sparc_SubCC_t); op_sparc_SubCC_t = NULL;
6532	free_ir_op(op_sparc_Stf); op_sparc_Stf = NULL;
6533	free_ir_op(op_sparc_SDiv); op_sparc_SDiv = NULL;
6534	free_ir_op(op_sparc_AddX_t); op_sparc_AddX_t = NULL;
6535	free_ir_op(op_sparc_fabs); op_sparc_fabs = NULL;
6536	free_ir_op(op_sparc_AddCC); op_sparc_AddCC = NULL;
6537	free_ir_op(op_sparc_Bicc); op_sparc_Bicc = NULL;
6538	free_ir_op(op_sparc_OrN); op_sparc_OrN = NULL;
6539	free_ir_op(op_sparc_SubX); op_sparc_SubX = NULL;
6540	free_ir_op(op_sparc_fcmp); op_sparc_fcmp = NULL;
6541	free_ir_op(op_sparc_OrCCZero); op_sparc_OrCCZero = NULL;
6542	free_ir_op(op_sparc_AddSP); op_sparc_AddSP = NULL;
6543	free_ir_op(op_sparc_SMulh); op_sparc_SMulh = NULL;
6544	free_ir_op(op_sparc_AddCC_t); op_sparc_AddCC_t = NULL;
6545	free_ir_op(op_sparc_Return); op_sparc_Return = NULL;
6546	free_ir_op(op_sparc_XNor); op_sparc_XNor = NULL;
6547	free_ir_op(op_sparc_AndNCCZero); op_sparc_AndNCCZero = NULL;
6548	free_ir_op(op_sparc_AndCCZero); op_sparc_AndCCZero = NULL;
6549	free_ir_op(op_sparc_FrameAddr); op_sparc_FrameAddr = NULL;
6550	free_ir_op(op_sparc_OrNCCZero); op_sparc_OrNCCZero = NULL;
6551	free_ir_op(op_sparc_And); op_sparc_And = NULL;
6552	free_ir_op(op_sparc_fmul); op_sparc_fmul = NULL;
6553	free_ir_op(op_sparc_AddCCZero); op_sparc_AddCCZero = NULL;
6554	free_ir_op(op_sparc_UDiv); op_sparc_UDiv = NULL;
6555	free_ir_op(op_sparc_Sll); op_sparc_Sll = NULL;
6556	free_ir_op(op_sparc_SwitchJmp); op_sparc_SwitchJmp = NULL;
6557	free_ir_op(op_sparc_Srl); op_sparc_Srl = NULL;
6558	free_ir_op(op_sparc_fneg); op_sparc_fneg = NULL;
6559	free_ir_op(op_sparc_fsub); op_sparc_fsub = NULL;
6560}
6561