6 $mode_flags = "mode_Bu";
7 $mode_fpflags = "mode_Bu";
12 # available SPARC registers: 8 globals, 24 window regs (8 ins, 8 outs, 8 locals)
15 # Note: locals come first here since they're usually constrained last
16 # (by calls and others)
17 { name => "l0", dwarf => 16 },
18 { name => "l1", dwarf => 17 },
19 { name => "l2", dwarf => 18 },
20 { name => "l3", dwarf => 19 },
21 { name => "l4", dwarf => 20 },
22 { name => "l5", dwarf => 21 },
23 { name => "l6", dwarf => 22 },
24 { name => "l7", dwarf => 23 },
26 { name => "g0", dwarf => 0 },
27 { name => "g1", dwarf => 1 },
28 { name => "g2", dwarf => 2 },
29 { name => "g3", dwarf => 3 },
30 { name => "g4", dwarf => 4 },
31 { name => "g5", dwarf => 5 },
32 { name => "g6", dwarf => 6 },
33 { name => "g7", dwarf => 7 },
35 { name => "o0", dwarf => 8 },
36 { name => "o1", dwarf => 9 },
37 { name => "o2", dwarf => 10 },
38 { name => "o3", dwarf => 11 },
39 { name => "o4", dwarf => 12 },
40 { name => "o5", dwarf => 13 },
41 { name => "sp", dwarf => 14 },
42 { name => "o7", dwarf => 15 },
44 { name => "i0", dwarf => 24 },
45 { name => "i1", dwarf => 25 },
46 { name => "i2", dwarf => 26 },
47 { name => "i3", dwarf => 27 },
48 { name => "i4", dwarf => 28 },
49 { name => "i5", dwarf => 29 },
50 { name => "frame_pointer", dwarf => 30, realname => "fp" },
51 { name => "i7", dwarf => 30 },
55 { name => "fpflags" },
56 { mode => $mode_fpflags, flags => "manual_ra" }
60 { mode => $mode_flags, flags => "manual_ra" }
64 { mode => $mode_gp, flags => "manual_ra" }
66 # fp registers can be accessed any time
68 { name => "f0", dwarf => 32 },
69 { name => "f1", dwarf => 33 },
70 { name => "f2", dwarf => 34 },
71 { name => "f3", dwarf => 35 },
72 { name => "f4", dwarf => 36 },
73 { name => "f5", dwarf => 37 },
74 { name => "f6", dwarf => 38 },
75 { name => "f7", dwarf => 39 },
76 { name => "f8", dwarf => 40 },
77 { name => "f9", dwarf => 41 },
78 { name => "f10", dwarf => 42 },
79 { name => "f11", dwarf => 43 },
80 { name => "f12", dwarf => 44 },
81 { name => "f13", dwarf => 45 },
82 { name => "f14", dwarf => 46 },
83 { name => "f15", dwarf => 47 },
84 { name => "f16", dwarf => 48 },
85 { name => "f17", dwarf => 49 },
86 { name => "f18", dwarf => 50 },
87 { name => "f19", dwarf => 51 },
88 { name => "f20", dwarf => 52 },
89 { name => "f21", dwarf => 53 },
90 { name => "f22", dwarf => 54 },
91 { name => "f23", dwarf => 55 },
92 { name => "f24", dwarf => 56 },
93 { name => "f25", dwarf => 57 },
94 { name => "f26", dwarf => 58 },
95 { name => "f27", dwarf => 59 },
96 { name => "f28", dwarf => 60 },
97 { name => "f29", dwarf => 61 },
98 { name => "f30", dwarf => 62 },
99 { name => "f31", dwarf => 63 },
104 $default_attr_type = "sparc_attr_t";
105 $default_copy_attr = "sparc_copy_attr";
108 sparc_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
109 sparc_load_store_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
110 sparc_jmp_cond_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
111 sparc_switch_jmp_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);\n".
112 "\tinit_sparc_switch_jmp_attributes(res, table, jump_table);\n",
113 sparc_fp_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);\n".
114 "\tinit_sparc_fp_attributes(res, fp_mode);\n",
115 sparc_fp_conv_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);".
116 "\tinit_sparc_fp_conv_attributes(res, src_mode, dest_mode);\n",
120 sparc_attr_t => "cmp_attr_sparc",
121 sparc_fp_attr_t => "cmp_attr_sparc_fp",
122 sparc_fp_conv_attr_t => "cmp_attr_sparc_fp_conv",
123 sparc_jmp_cond_attr_t => "cmp_attr_sparc_jmp_cond",
124 sparc_load_store_attr_t => "cmp_attr_sparc_load_store",
125 sparc_switch_jmp_attr_t => "cmp_attr_sparc",
128 %custom_irn_flags = (
129 modifies_flags => "(arch_irn_flags_t)sparc_arch_irn_flag_modifies_flags",
130 modifies_fp_flags => "(arch_irn_flags_t)sparc_arch_irn_flag_modifies_fp_flags",
131 has_delay_slot => "(arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot",
134 my %cmp_operand_constructors = (
136 attr => "ir_entity *immediate_entity, int32_t immediate_value",
137 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
138 reg_req => { in => [ "gp" ], out => [ "flags" ] },
142 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
143 ins => [ "left", "right" ],
147 my %binop_operand_constructors = (
149 attr => "ir_entity *immediate_entity, int32_t immediate_value",
150 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
151 reg_req => { in => [ "gp" ], out => [ "gp" ] },
155 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
156 ins => [ "left", "right" ],
160 my %binopcc_operand_constructors = (
162 attr => "ir_entity *immediate_entity, int32_t immediate_value",
163 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
164 reg_req => { in => [ "gp" ], out => [ "gp", "flags" ] },
168 reg_req => { in => [ "gp", "gp" ], out => [ "gp", "flags" ] },
169 ins => [ "left", "right" ],
173 my %binopx_operand_constructors = (
175 attr => "ir_entity *immediate_entity, int32_t immediate_value",
176 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
177 reg_req => { in => [ "gp", "flags" ], out => [ "gp" ] },
178 ins => [ "left", "carry" ],
181 reg_req => { in => [ "gp", "gp", "flags" ], out => [ "gp" ] },
182 ins => [ "left", "right", "carry" ],
187 my %binopcczero_operand_constructors = (
189 attr => "ir_entity *immediate_entity, int32_t immediate_value",
190 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
191 reg_req => { in => [ "gp" ], out => [ "flags" ] },
195 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
196 ins => [ "left", "right" ],
200 my %div_operand_constructors = (
202 attr => "ir_entity *immediate_entity, int32_t immediate_value",
203 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
204 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
207 reg_req => { in => [ "gp", "gp", "gp" ], out => [ "gp" ] },
211 my %float_binop_constructors = (
213 reg_req => { in => [ "fp", "fp" ], out => [ "fp" ] },
217 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2" ] },
221 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4" ] },
226 my %float_unop_constructors = (
228 reg_req => { in => [ "fp" ], out => [ "fp" ] },
232 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|2" ] },
236 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|4" ] },
244 irn_flags => [ "rematerializable" ],
246 emit => 'add %S0, %SI1, %D0',
247 constructors => \%binop_operand_constructors,
251 irn_flags => [ "rematerializable", "modifies_flags" ],
252 emit => 'addcc %S0, %SI1, %D0',
253 outs => [ "res", "flags" ],
254 constructors => \%binopcc_operand_constructors,
258 irn_flags => [ "rematerializable", "modifies_flags" ],
259 emit => 'addcc %S0, %SI1, %%g0',
261 constructors => \%binopcczero_operand_constructors,
265 # At the moment not rematerializable because of assert in beflags.c/
266 # (it claims that spiller can't rematerialize flag stuff correctly)
267 #irn_flags => [ "rematerializable" ],
268 emit => 'addx %S0, %SI1, %D0',
269 constructors => \%binopx_operand_constructors,
274 ins => [ "left", "right" ],
275 outs => [ "res", "flags" ],
281 ins => [ "left", "right", "flags_input" ],
287 irn_flags => [ "rematerializable" ],
289 emit => 'sub %S0, %SI1, %D0',
290 constructors => \%binop_operand_constructors,
294 irn_flags => [ "rematerializable", "modifies_flags" ],
295 emit => 'subcc %S0, %SI1, %D0',
296 outs => [ "res", "flags" ],
297 constructors => \%binopcc_operand_constructors,
301 irn_flags => [ "rematerializable", "modifies_flags" ],
302 emit => 'subcc %S0, %SI1, %%g0',
304 constructors => \%binopcczero_operand_constructors,
308 # Not rematerializable (see AddX)
309 emit => 'subx %S0, %SI1, %D0',
310 constructors => \%binopx_operand_constructors,
315 ins => [ "left", "right" ],
316 outs => [ "res", "flags" ],
322 ins => [ "left", "right", "flags_input" ],
329 op_flags => [ "uses_memory" ],
330 state => "exc_pinned",
333 reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
334 ins => [ "ptr", "mem" ],
335 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
336 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
339 reg_req => { in => [ "gp", "gp", "none" ], out => [ "gp", "none" ] },
340 ins => [ "ptr", "ptr2", "mem" ],
341 attr => "ir_mode *ls_mode",
342 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
345 ins => [ "ptr", "mem" ],
346 outs => [ "res", "M" ],
347 attr_type => "sparc_load_store_attr_t",
348 emit => 'ld%ML [%S0%O1], %D0'
352 irn_flags => [ "rematerializable" ],
355 reg_req => { in => [], out => [ "gp" ] },
356 attr => "ir_entity *entity, int32_t immediate_value",
357 custominit => "sparc_set_attr_imm(res, entity, immediate_value);",
358 emit => 'sethi %H, %D0'
362 op_flags => [ "uses_memory" ],
364 state => "exc_pinned",
367 reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
368 ins => [ "val", "ptr", "mem" ],
369 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
370 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
373 reg_req => { in => [ "gp", "gp", "gp", "none" ], out => [ "none" ] },
374 ins => [ "val", "ptr", "ptr2", "mem" ],
375 attr => "ir_mode *ls_mode",
376 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
379 ins => [ "val", "ptr", "mem" ],
381 attr_type => "sparc_load_store_attr_t",
382 emit => 'st%MS %S0, [%S1%O2]'
386 emit => 'save %S0, %SI1, %D0',
391 attr => "ir_entity *immediate_entity, int32_t immediate_value",
392 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
393 reg_req => { in => [ "sp" ], out => [ "sp:I|S" ] },
397 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
398 ins => [ "stack", "increment" ],
405 outs => [ "stack", "res" ],
408 attr => "ir_entity *immediate_entity, int32_t immediate_value",
409 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
410 reg_req => { in => [ "sp", "frame_pointer", "gp" ], out => [ "sp:I|S", "gp" ] },
411 ins => [ "stack", "frame_pointer", "left" ],
414 reg_req => { in => [ "sp", "frame_pointer", "gp", "gp" ], out => [ "sp:I|S", "gp" ] },
415 ins => [ "stack", "frame_pointer", "left", "right" ],
421 reg_req => { in => [ "sp", "frame_pointer" ], out => [ "sp:I|S" ] },
422 ins => [ "stack", "frame_pointer" ],
431 attr => "ir_entity *immediate_entity, int32_t immediate_value",
432 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
433 reg_req => { in => [ "sp", "none" ], out => [ "sp:I|S", "gp", "none" ] },
434 ins => [ "stack", "mem" ],
437 reg_req => { in => [ "sp", "gp", "none" ], out => [ "sp:I|S", "gp", "none" ] },
438 ins => [ "stack", "size", "mem" ],
441 outs => [ "stack", "addr", "M" ],
445 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
446 ins => [ "stack", "size" ],
448 emit => "add %S0, %S1, %D0\n",
453 op_flags => [ "constlike" ],
454 irn_flags => [ "rematerializable" ],
455 attr => "ir_entity *entity, int32_t offset",
456 reg_req => { in => [ "gp" ], out => [ "gp" ] },
458 attr_type => "sparc_attr_t",
459 custominit => "sparc_set_attr_imm(res, entity, offset);",
464 op_flags => [ "cfopcode", "forking" ],
465 irn_flags => [ "has_delay_slot" ],
468 attr_type => "sparc_jmp_cond_attr_t",
469 attr => "ir_relation relation, bool is_unsigned",
470 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, is_unsigned);",
471 reg_req => { in => [ "flags" ], out => [ "none", "none" ] },
473 outs => [ "false", "true" ],
477 op_flags => [ "cfopcode", "forking" ],
478 irn_flags => [ "has_delay_slot" ],
481 attr_type => "sparc_jmp_cond_attr_t",
482 attr => "ir_relation relation",
483 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, false);",
484 reg_req => { in => [ "fpflags" ], out => [ "none", "none" ] },
486 outs => [ "false", "true" ],
490 # Note: has_delay_slot depends on wether it is a fallthrough or not, so we
491 # have special code for this in sparc_emitter
493 op_flags => [ "cfopcode" ],
494 irn_flags => [ "simple_jump" ],
495 reg_req => { out => [ "none" ] },
501 out_arity => "variable",
505 # This is a Jump instruction, but with the addition that you can add custom
506 # register constraints to model your calling conventions
509 op_flags => [ "cfopcode" ],
510 irn_flags => [ "has_delay_slot" ],
515 attr => "ir_entity *entity, int32_t offset",
516 custominit => "\tsparc_set_attr_imm(res, entity, offset);",
518 reg_req => { out => [ "none" ] },
522 reg_req => { out => [ "none" ] },
527 # This is a JumpLink instruction, but with the addition that you can add custom
528 # register constraints to model your calling conventions
530 irn_flags => [ "modifies_flags", "modifies_fp_flags", "has_delay_slot" ],
531 state => "exc_pinned",
533 out_arity => "variable",
536 attr => "ir_entity *entity, int32_t offset, bool aggregate_return",
537 custominit => "\tsparc_set_attr_imm(res, entity, offset);".
538 "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
540 out_arity => "variable",
543 attr => "bool aggregate_return",
545 out_arity => "variable",
546 custominit => "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
551 Cmp => { # aka SubccZero
552 irn_flags => [ "rematerializable", "modifies_flags" ],
553 emit => 'cmp %S0, %SI1',
555 constructors => \%binopcczero_operand_constructors,
559 op_flags => [ "cfopcode", "forking" ],
560 irn_flags => [ "has_delay_slot" ],
563 reg_req => { in => [ "gp" ], out => [ ] },
564 out_arity => "variable",
565 attr_type => "sparc_switch_jmp_attr_t",
566 attr => "const ir_switch_table *table, ir_entity *jump_table",
570 irn_flags => [ "rematerializable" ],
572 emit => 'sll %S0, %SI1, %D0',
573 constructors => \%binop_operand_constructors,
577 irn_flags => [ "rematerializable" ],
579 emit => 'srl %S0, %SI1, %D0',
580 constructors => \%binop_operand_constructors,
584 irn_flags => [ "rematerializable" ],
586 emit => 'sra %S0, %SI1, %D0',
587 constructors => \%binop_operand_constructors,
591 irn_flags => [ "rematerializable" ],
593 emit => 'and %S0, %SI1, %D0',
594 constructors => \%binop_operand_constructors,
598 irn_flags => [ "rematerializable", "modifies_flags" ],
599 emit => 'andcc %S0, %SI1, %%g0',
601 constructors => \%binopcczero_operand_constructors,
605 irn_flags => [ "rematerializable" ],
607 emit => 'andn %S0, %SI1, %D0',
608 constructors => \%binop_operand_constructors,
612 irn_flags => [ "rematerializable", "modifies_flags" ],
613 emit => 'andncc %S0, %SI1, %%g0',
615 constructors => \%binopcczero_operand_constructors,
619 irn_flags => [ "rematerializable" ],
621 emit => 'or %S0, %SI1, %D0',
622 constructors => \%binop_operand_constructors,
626 irn_flags => [ "rematerializable", "modifies_flags" ],
627 emit => 'orcc %S0, %SI1, %%g0',
629 constructors => \%binopcczero_operand_constructors,
633 irn_flags => [ "rematerializable" ],
635 emit => 'orn %S0, %SI1, %D0',
636 constructors => \%binop_operand_constructors,
640 irn_flags => [ "rematerializable", "modifies_flags" ],
641 emit => 'orncc %S0, %SI1, %%g0',
643 constructors => \%binopcczero_operand_constructors,
647 irn_flags => [ "rematerializable" ],
649 emit => 'xor %S0, %SI1, %D0',
650 constructors => \%binop_operand_constructors,
654 irn_flags => [ "rematerializable", "modifies_flags" ],
655 emit => 'xorcc %S0, %SI1, %%g0',
657 constructors => \%binopcczero_operand_constructors,
661 irn_flags => [ "rematerializable" ],
663 emit => 'xnor %S0, %SI1, %D0',
664 constructors => \%binop_operand_constructors,
668 irn_flags => [ "rematerializable", "modifies_flags" ],
669 emit => 'xnorcc %S0, %SI1, %%g0',
671 constructors => \%binopcczero_operand_constructors,
675 irn_flags => [ "rematerializable" ],
677 emit => 'smul %S0, %SI1, %D0',
678 constructors => \%binop_operand_constructors,
682 irn_flags => [ "rematerializable", "modifies_flags" ],
683 emit => 'smulcc %S0, %SI1, %%g0',
685 constructors => \%binopcczero_operand_constructors,
689 irn_flags => [ "rematerializable" ],
690 outs => [ "low", "high" ],
691 emit => 'smul %S0, %SI1, %D0\n'.
693 constructors => \%binop_operand_constructors,
697 irn_flags => [ "rematerializable" ],
698 outs => [ "low", "high" ],
699 emit => 'umul %S0, %SI1, %D0\n'.
701 constructors => \%binop_operand_constructors,
705 irn_flags => [ "rematerializable", "has_delay_slot" ],
706 state => "exc_pinned",
707 ins => [ "dividend_high", "dividend_low", "divisor" ],
708 outs => [ "res", "M" ],
709 constructors => \%div_operand_constructors,
713 irn_flags => [ "rematerializable", "has_delay_slot" ],
714 state => "exc_pinned",
715 ins => [ "dividend_high", "dividend_low", "divisor" ],
716 outs => [ "res", "M" ],
717 constructors => \%div_operand_constructors,
721 irn_flags => [ "rematerializable", "modifies_fp_flags" ],
722 emit => 'fcmp%FM %S0, %S1',
723 attr_type => "sparc_fp_attr_t",
724 attr => "ir_mode *fp_mode",
725 mode => $mode_fpflags,
728 reg_req => { in => [ "fp", "fp" ], out => [ "fpflags" ] },
731 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fpflags" ] },
734 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fpflags" ] },
740 op_flags => [ "commutative" ],
741 irn_flags => [ "rematerializable" ],
742 emit => 'fadd%FM %S0, %S1, %D0',
743 attr_type => "sparc_fp_attr_t",
744 attr => "ir_mode *fp_mode",
745 ins => [ "left", "right" ],
746 constructors => \%float_binop_constructors,
750 irn_flags => [ "rematerializable" ],
751 emit => 'fsub%FM %S0, %S1, %D0',
752 attr_type => "sparc_fp_attr_t",
753 attr => "ir_mode *fp_mode",
754 ins => [ "left", "right" ],
755 constructors => \%float_binop_constructors,
759 irn_flags => [ "rematerializable" ],
760 op_flags => [ "commutative" ],
761 emit =>'fmul%FM %S0, %S1, %D0',
762 attr_type => "sparc_fp_attr_t",
763 attr => "ir_mode *fp_mode",
764 ins => [ "left", "right" ],
765 constructors => \%float_binop_constructors,
769 irn_flags => [ "rematerializable" ],
770 emit => 'fdiv%FM %S0, %S1, %D0',
771 attr_type => "sparc_fp_attr_t",
772 attr => "ir_mode *fp_mode",
773 ins => [ "left", "right" ],
774 outs => [ "res", "M" ],
777 reg_req => { in => [ "fp", "fp" ], out => [ "fp", "none" ] },
780 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2", "none" ] },
783 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4", "none" ] },
789 irn_flags => [ "rematerializable" ],
790 reg_req => { in => [ "fp" ], out => [ "fp" ] },
791 # note that we only need the first register even for wide-values
792 emit => 'fnegs %S0, %D0',
793 attr_type => "sparc_fp_attr_t",
794 attr => "ir_mode *fp_mode",
796 constructors => \%float_unop_constructors,
800 irn_flags => [ "rematerializable" ],
801 # note that we only need the first register even for wide-values
802 emit => 'fabs %S0, %D0',
803 attr_type => "sparc_fp_attr_t",
804 attr => "ir_mode *fp_mode",
806 constructors => \%float_unop_constructors,
810 irn_flags => [ "rematerializable" ],
811 emit => 'f%FSto%FD %S0, %D0',
812 attr_type => "sparc_fp_conv_attr_t",
813 attr => "ir_mode *src_mode, ir_mode *dest_mode",
816 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
820 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
824 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
828 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|4" ] },
832 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
836 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|2" ] },
843 irn_flags => [ "rematerializable" ],
844 emit => 'fito%FM %S0, %D0',
845 attr_type => "sparc_fp_attr_t",
846 attr => "ir_mode *fp_mode",
849 reg_req => { in => [ "fp" ], out => [ "fp" ] },
853 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
857 reg_req => { in => [ "fp" ], out => [ "fp:a|4" ] },
864 irn_flags => [ "rematerializable" ],
865 emit => 'f%FMtoi %S0, %D0',
866 attr_type => "sparc_fp_attr_t",
867 attr => "ir_mode *fp_mode",
871 reg_req => { in => [ "fp" ], out => [ "fp" ] },
874 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
877 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
883 op_flags => [ "uses_memory" ],
884 state => "exc_pinned",
887 reg_req => { in => [ "gp", "none" ], out => [ "fp", "none" ] },
890 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|2", "none" ] },
893 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|4", "none" ] },
896 ins => [ "ptr", "mem" ],
897 outs => [ "res", "M" ],
898 attr_type => "sparc_load_store_attr_t",
899 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
900 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
901 emit => 'ld%ML [%S0%O1], %D0'
905 op_flags => [ "uses_memory" ],
906 state => "exc_pinned",
909 reg_req => { in => [ "fp", "gp", "none" ], out => [ "none" ] },
912 reg_req => { in => [ "fp:a|2", "gp", "none" ], out => [ "none" ] },
915 reg_req => { in => [ "fp:a|4", "gp", "none" ], out => [ "none" ] },
918 ins => [ "val", "ptr", "mem" ],
920 attr_type => "sparc_load_store_attr_t",
921 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
922 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
923 emit => 'st%MS %S0, [%S1%O2]',