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 { name => "g0", dwarf => 0 },
16 { name => "g1", dwarf => 1 },
17 { name => "g2", dwarf => 2 },
18 { name => "g3", dwarf => 3 },
19 { name => "g4", dwarf => 4 },
20 { name => "g5", dwarf => 5 },
21 { name => "g6", dwarf => 6 },
22 { name => "g7", dwarf => 7 },
24 { name => "o0", dwarf => 8 },
25 { name => "o1", dwarf => 9 },
26 { name => "o2", dwarf => 10 },
27 { name => "o3", dwarf => 11 },
28 { name => "o4", dwarf => 12 },
29 { name => "o5", dwarf => 13 },
30 { name => "sp", dwarf => 14 },
31 { name => "o7", dwarf => 15 },
33 { name => "l0", dwarf => 16 },
34 { name => "l1", dwarf => 17 },
35 { name => "l2", dwarf => 18 },
36 { name => "l3", dwarf => 19 },
37 { name => "l4", dwarf => 20 },
38 { name => "l5", dwarf => 21 },
39 { name => "l6", dwarf => 22 },
40 { name => "l7", dwarf => 23 },
42 { name => "i0", dwarf => 24 },
43 { name => "i1", dwarf => 25 },
44 { name => "i2", dwarf => 26 },
45 { name => "i3", dwarf => 27 },
46 { name => "i4", dwarf => 28 },
47 { name => "i5", dwarf => 29 },
48 { name => "frame_pointer", dwarf => 30, realname => "fp" },
49 { name => "i7", dwarf => 30 },
53 { name => "fpflags" },
54 { mode => $mode_fpflags, flags => "manual_ra" }
58 { mode => $mode_flags, flags => "manual_ra" }
62 { mode => $mode_gp, flags => "manual_ra" }
64 # fp registers can be accessed any time
66 { name => "f0", dwarf => 32 },
67 { name => "f1", dwarf => 33 },
68 { name => "f2", dwarf => 34 },
69 { name => "f3", dwarf => 35 },
70 { name => "f4", dwarf => 36 },
71 { name => "f5", dwarf => 37 },
72 { name => "f6", dwarf => 38 },
73 { name => "f7", dwarf => 39 },
74 { name => "f8", dwarf => 40 },
75 { name => "f9", dwarf => 41 },
76 { name => "f10", dwarf => 42 },
77 { name => "f11", dwarf => 43 },
78 { name => "f12", dwarf => 44 },
79 { name => "f13", dwarf => 45 },
80 { name => "f14", dwarf => 46 },
81 { name => "f15", dwarf => 47 },
82 { name => "f16", dwarf => 48 },
83 { name => "f17", dwarf => 49 },
84 { name => "f18", dwarf => 50 },
85 { name => "f19", dwarf => 51 },
86 { name => "f20", dwarf => 52 },
87 { name => "f21", dwarf => 53 },
88 { name => "f22", dwarf => 54 },
89 { name => "f23", dwarf => 55 },
90 { name => "f24", dwarf => 56 },
91 { name => "f25", dwarf => 57 },
92 { name => "f26", dwarf => 58 },
93 { name => "f27", dwarf => 59 },
94 { name => "f28", dwarf => 60 },
95 { name => "f29", dwarf => 61 },
96 { name => "f30", dwarf => 62 },
97 { name => "f31", dwarf => 63 },
103 # emit source reg or imm dep. on node's arity
104 RI => "${arch}_emit_reg_or_imm(node, -1);",
105 R1I => "${arch}_emit_reg_or_imm(node, 1);",
106 R2I => "${arch}_emit_reg_or_imm(node, 2);",
107 S0 => "${arch}_emit_source_register(node, 0);",
108 S1 => "${arch}_emit_source_register(node, 1);",
109 D0 => "${arch}_emit_dest_register(node, 0);",
110 D1 => "${arch}_emit_dest_register(node, 1);",
111 HIM => "${arch}_emit_high_immediate(node);",
112 LM => "${arch}_emit_load_mode(node);",
113 SM => "${arch}_emit_store_mode(node);",
114 FLSM => "${arch}_emit_float_load_store_mode(node);",
115 FPM => "${arch}_emit_fp_mode_suffix(node);",
116 FCONVS => "${arch}_emit_fp_conv_source(node);",
117 FCONVD => "${arch}_emit_fp_conv_destination(node);",
118 O1 => "${arch}_emit_offset(node, 1);",
119 O2 => "${arch}_emit_offset(node, 2);",
120 S0O1 => "${arch}_emit_source_reg_and_offset(node, 0, 1);",
121 S1O2 => "${arch}_emit_source_reg_and_offset(node, 1, 2);",
123 $indent_line_func = "sparc_emit_indent()";
125 $default_attr_type = "sparc_attr_t";
126 $default_copy_attr = "sparc_copy_attr";
129 sparc_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
130 sparc_load_store_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
131 sparc_jmp_cond_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);",
132 sparc_switch_jmp_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);\n".
133 "\tinit_sparc_switch_jmp_attributes(res, table, jump_table);\n",
134 sparc_fp_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);\n".
135 "\tinit_sparc_fp_attributes(res, fp_mode);\n",
136 sparc_fp_conv_attr_t => "\tinit_sparc_attributes(res, irn_flags_, in_reqs, n_res);".
137 "\tinit_sparc_fp_conv_attributes(res, src_mode, dest_mode);\n",
141 sparc_attr_t => "cmp_attr_sparc",
142 sparc_fp_attr_t => "cmp_attr_sparc_fp",
143 sparc_fp_conv_attr_t => "cmp_attr_sparc_fp_conv",
144 sparc_jmp_cond_attr_t => "cmp_attr_sparc_jmp_cond",
145 sparc_load_store_attr_t => "cmp_attr_sparc_load_store",
146 sparc_switch_jmp_attr_t => "cmp_attr_sparc",
149 %custom_irn_flags = (
150 modifies_flags => "(arch_irn_flags_t)sparc_arch_irn_flag_modifies_flags",
151 modifies_fp_flags => "(arch_irn_flags_t)sparc_arch_irn_flag_modifies_fp_flags",
152 has_delay_slot => "(arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot",
155 my %cmp_operand_constructors = (
157 attr => "ir_entity *immediate_entity, int32_t immediate_value",
158 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
159 reg_req => { in => [ "gp" ], out => [ "flags" ] },
163 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
164 ins => [ "left", "right" ],
168 my %binop_operand_constructors = (
170 attr => "ir_entity *immediate_entity, int32_t immediate_value",
171 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
172 reg_req => { in => [ "gp" ], out => [ "gp" ] },
176 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
177 ins => [ "left", "right" ],
181 my %binopcc_operand_constructors = (
183 attr => "ir_entity *immediate_entity, int32_t immediate_value",
184 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
185 reg_req => { in => [ "gp" ], out => [ "gp", "flags" ] },
189 reg_req => { in => [ "gp", "gp" ], out => [ "gp", "flags" ] },
190 ins => [ "left", "right" ],
194 my %binopx_operand_constructors = (
196 attr => "ir_entity *immediate_entity, int32_t immediate_value",
197 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
198 reg_req => { in => [ "gp", "flags" ], out => [ "gp" ] },
199 ins => [ "left", "carry" ],
202 reg_req => { in => [ "gp", "gp", "flags" ], out => [ "gp" ] },
203 ins => [ "left", "right", "carry" ],
208 my %binopcczero_operand_constructors = (
210 attr => "ir_entity *immediate_entity, int32_t immediate_value",
211 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
212 reg_req => { in => [ "gp" ], out => [ "flags" ] },
216 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
217 ins => [ "left", "right" ],
221 my %div_operand_constructors = (
223 attr => "ir_entity *immediate_entity, int32_t immediate_value",
224 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
225 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
228 reg_req => { in => [ "gp", "gp", "gp" ], out => [ "gp" ] },
232 my %float_binop_constructors = (
234 reg_req => { in => [ "fp", "fp" ], out => [ "fp" ] },
238 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2" ] },
242 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4" ] },
247 my %float_unop_constructors = (
249 reg_req => { in => [ "fp" ], out => [ "fp" ] },
253 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|2" ] },
257 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|4" ] },
265 irn_flags => [ "rematerializable" ],
267 emit => '. add %S0, %R1I, %D0',
268 constructors => \%binop_operand_constructors,
272 irn_flags => [ "rematerializable", "modifies_flags" ],
273 emit => '. addcc %S0, %R1I, %D0',
274 outs => [ "res", "flags" ],
275 constructors => \%binopcc_operand_constructors,
279 irn_flags => [ "rematerializable", "modifies_flags" ],
280 emit => '. addcc %S0, %R1I, %%g0',
282 constructors => \%binopcczero_operand_constructors,
286 # At the moment not rematerializable because of assert in beflags.c/
287 # (it claims that spiller can't rematerialize flag stuff correctly)
288 #irn_flags => [ "rematerializable" ],
289 emit => '. addx %S0, %R1I, %D0',
290 constructors => \%binopx_operand_constructors,
295 ins => [ "left", "right" ],
296 outs => [ "res", "flags" ],
302 ins => [ "left", "right", "flags_input" ],
308 irn_flags => [ "rematerializable" ],
310 emit => '. sub %S0, %R1I, %D0',
311 constructors => \%binop_operand_constructors,
315 irn_flags => [ "rematerializable", "modifies_flags" ],
316 emit => '. subcc %S0, %R1I, %D0',
317 outs => [ "res", "flags" ],
318 constructors => \%binopcc_operand_constructors,
322 irn_flags => [ "rematerializable", "modifies_flags" ],
323 emit => '. subcc %S0, %R1I, %%g0',
325 constructors => \%binopcczero_operand_constructors,
329 # Not rematerializable (see AddX)
330 emit => '. subx %S0, %R1I, %D0',
331 constructors => \%binopx_operand_constructors,
336 ins => [ "left", "right" ],
337 outs => [ "res", "flags" ],
343 ins => [ "left", "right", "flags_input" ],
350 op_flags => [ "uses_memory" ],
351 state => "exc_pinned",
354 reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
355 ins => [ "ptr", "mem" ],
356 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
357 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
360 reg_req => { in => [ "gp", "gp", "none" ], out => [ "gp", "none" ] },
361 ins => [ "ptr", "ptr2", "mem" ],
362 attr => "ir_mode *ls_mode",
363 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
366 ins => [ "ptr", "mem" ],
367 outs => [ "res", "M" ],
368 attr_type => "sparc_load_store_attr_t",
369 emit => '. ld%LM [%S0O1], %D0'
373 irn_flags => [ "rematerializable" ],
376 reg_req => { in => [], out => [ "gp" ] },
377 attr => "ir_entity *entity, int32_t immediate_value",
378 custominit => "sparc_set_attr_imm(res, entity, immediate_value);",
379 emit => '. sethi %HIM, %D0'
383 op_flags => [ "uses_memory" ],
385 state => "exc_pinned",
388 reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
389 ins => [ "val", "ptr", "mem" ],
390 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
391 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
394 reg_req => { in => [ "gp", "gp", "gp", "none" ], out => [ "none" ] },
395 ins => [ "val", "ptr", "ptr2", "mem" ],
396 attr => "ir_mode *ls_mode",
397 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
400 ins => [ "val", "ptr", "mem" ],
402 attr_type => "sparc_load_store_attr_t",
403 emit => '. st%SM %S0, [%S1O2]'
407 emit => '. save %S0, %R1I, %D0',
412 attr => "ir_entity *immediate_entity, int32_t immediate_value",
413 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
414 reg_req => { in => [ "sp" ], out => [ "sp:I|S" ] },
418 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
419 ins => [ "stack", "increment" ],
426 outs => [ "stack", "res" ],
429 attr => "ir_entity *immediate_entity, int32_t immediate_value",
430 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
431 reg_req => { in => [ "sp", "frame_pointer", "gp" ], out => [ "sp:I|S", "gp" ] },
432 ins => [ "stack", "frame_pointer", "left" ],
435 reg_req => { in => [ "sp", "frame_pointer", "gp", "gp" ], out => [ "sp:I|S", "gp" ] },
436 ins => [ "stack", "frame_pointer", "left", "right" ],
442 reg_req => { in => [ "sp", "frame_pointer" ], out => [ "sp:I|S" ] },
443 ins => [ "stack", "frame_pointer" ],
450 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
451 ins => [ "stack", "size" ],
453 emit => ". sub %S0, %S1, %D0\n",
458 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
459 ins => [ "stack", "size" ],
461 emit => ". add %S0, %S1, %D0\n",
466 op_flags => [ "constlike" ],
467 irn_flags => [ "rematerializable" ],
468 attr => "ir_entity *entity, int32_t offset",
469 reg_req => { in => [ "gp" ], out => [ "gp" ] },
471 attr_type => "sparc_attr_t",
472 custominit => "sparc_set_attr_imm(res, entity, offset);",
477 op_flags => [ "cfopcode", "forking" ],
478 irn_flags => [ "has_delay_slot" ],
481 attr_type => "sparc_jmp_cond_attr_t",
482 attr => "ir_relation relation, bool is_unsigned",
483 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, is_unsigned);",
484 reg_req => { in => [ "flags" ], out => [ "none", "none" ] },
486 outs => [ "false", "true" ],
490 op_flags => [ "cfopcode", "forking" ],
491 irn_flags => [ "has_delay_slot" ],
494 attr_type => "sparc_jmp_cond_attr_t",
495 attr => "ir_relation relation",
496 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, false);",
497 reg_req => { in => [ "fpflags" ], out => [ "none", "none" ] },
499 outs => [ "false", "true" ],
503 # Note: has_delay_slot depends on wether it is a fallthrough or not, so we
504 # have special code for this in sparc_emitter
506 op_flags => [ "cfopcode" ],
507 irn_flags => [ "simple_jump" ],
508 reg_req => { out => [ "none" ] },
514 out_arity => "variable",
518 # This is a Jump instruction, but with the addition that you can add custom
519 # register constraints to model your calling conventions
522 op_flags => [ "cfopcode" ],
523 irn_flags => [ "has_delay_slot" ],
528 attr => "ir_entity *entity, int32_t offset",
529 custominit => "\tsparc_set_attr_imm(res, entity, offset);",
531 reg_req => { out => [ "none" ] },
535 reg_req => { out => [ "none" ] },
540 # This is a JumpLink instruction, but with the addition that you can add custom
541 # register constraints to model your calling conventions
543 irn_flags => [ "modifies_flags", "modifies_fp_flags", "has_delay_slot" ],
544 state => "exc_pinned",
546 out_arity => "variable",
549 attr => "ir_entity *entity, int32_t offset, bool aggregate_return",
550 custominit => "\tsparc_set_attr_imm(res, entity, offset);".
551 "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
553 out_arity => "variable",
556 attr => "bool aggregate_return",
558 out_arity => "variable",
559 custominit => "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
564 Cmp => { # aka SubccZero
565 irn_flags => [ "rematerializable", "modifies_flags" ],
566 emit => '. cmp %S0, %R1I',
568 constructors => \%binopcczero_operand_constructors,
572 op_flags => [ "cfopcode", "forking" ],
573 irn_flags => [ "has_delay_slot" ],
576 reg_req => { in => [ "gp" ], out => [ ] },
577 out_arity => "variable",
578 attr_type => "sparc_switch_jmp_attr_t",
579 attr => "const ir_switch_table *table, ir_entity *jump_table",
583 irn_flags => [ "rematerializable" ],
585 emit => '. sll %S0, %R1I, %D0',
586 constructors => \%binop_operand_constructors,
590 irn_flags => [ "rematerializable" ],
592 emit => '. srl %S0, %R1I, %D0',
593 constructors => \%binop_operand_constructors,
597 irn_flags => [ "rematerializable" ],
599 emit => '. sra %S0, %R1I, %D0',
600 constructors => \%binop_operand_constructors,
604 irn_flags => [ "rematerializable" ],
606 emit => '. and %S0, %R1I, %D0',
607 constructors => \%binop_operand_constructors,
611 irn_flags => [ "rematerializable", "modifies_flags" ],
612 emit => '. andcc %S0, %R1I, %%g0',
614 constructors => \%binopcczero_operand_constructors,
618 irn_flags => [ "rematerializable" ],
620 emit => '. andn %S0, %R1I, %D0',
621 constructors => \%binop_operand_constructors,
625 irn_flags => [ "rematerializable", "modifies_flags" ],
626 emit => '. andncc %S0, %R1I, %%g0',
628 constructors => \%binopcczero_operand_constructors,
632 irn_flags => [ "rematerializable" ],
634 emit => '. or %S0, %R1I, %D0',
635 constructors => \%binop_operand_constructors,
639 irn_flags => [ "rematerializable", "modifies_flags" ],
640 emit => '. orcc %S0, %R1I, %%g0',
642 constructors => \%binopcczero_operand_constructors,
646 irn_flags => [ "rematerializable" ],
648 emit => '. orn %S0, %R1I, %D0',
649 constructors => \%binop_operand_constructors,
653 irn_flags => [ "rematerializable", "modifies_flags" ],
654 emit => '. orncc %S0, %R1I, %%g0',
656 constructors => \%binopcczero_operand_constructors,
660 irn_flags => [ "rematerializable" ],
662 emit => '. xor %S0, %R1I, %D0',
663 constructors => \%binop_operand_constructors,
667 irn_flags => [ "rematerializable", "modifies_flags" ],
668 emit => '. xorcc %S0, %R1I, %%g0',
670 constructors => \%binopcczero_operand_constructors,
674 irn_flags => [ "rematerializable" ],
676 emit => '. xnor %S0, %R1I, %D0',
677 constructors => \%binop_operand_constructors,
681 irn_flags => [ "rematerializable", "modifies_flags" ],
682 emit => '. xnorcc %S0, %R1I, %%g0',
684 constructors => \%binopcczero_operand_constructors,
688 irn_flags => [ "rematerializable" ],
690 emit => '. smul %S0, %R1I, %D0',
691 constructors => \%binop_operand_constructors,
695 irn_flags => [ "rematerializable", "modifies_flags" ],
696 emit => '. smulcc %S0, %R1I, %%g0',
698 constructors => \%binopcczero_operand_constructors,
702 irn_flags => [ "rematerializable" ],
703 outs => [ "low", "high" ],
704 constructors => \%binop_operand_constructors,
708 irn_flags => [ "rematerializable" ],
709 outs => [ "low", "high" ],
710 constructors => \%binop_operand_constructors,
714 irn_flags => [ "rematerializable", "has_delay_slot" ],
715 state => "exc_pinned",
716 ins => [ "dividend_high", "dividend_low", "divisor" ],
717 outs => [ "res", "M" ],
718 constructors => \%div_operand_constructors,
722 irn_flags => [ "rematerializable", "has_delay_slot" ],
723 state => "exc_pinned",
724 ins => [ "dividend_high", "dividend_low", "divisor" ],
725 outs => [ "res", "M" ],
726 constructors => \%div_operand_constructors,
730 irn_flags => [ "rematerializable", "modifies_fp_flags" ],
731 emit => '. fcmp%FPM %S0, %S1',
732 attr_type => "sparc_fp_attr_t",
733 attr => "ir_mode *fp_mode",
734 mode => $mode_fpflags,
737 reg_req => { in => [ "fp", "fp" ], out => [ "fpflags" ] },
740 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fpflags" ] },
743 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fpflags" ] },
749 op_flags => [ "commutative" ],
750 irn_flags => [ "rematerializable" ],
751 emit => '. fadd%FPM %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 emit => '. fsub%FPM %S0, %S1, %D0',
761 attr_type => "sparc_fp_attr_t",
762 attr => "ir_mode *fp_mode",
763 ins => [ "left", "right" ],
764 constructors => \%float_binop_constructors,
768 irn_flags => [ "rematerializable" ],
769 op_flags => [ "commutative" ],
770 emit =>'. fmul%FPM %S0, %S1, %D0',
771 attr_type => "sparc_fp_attr_t",
772 attr => "ir_mode *fp_mode",
773 ins => [ "left", "right" ],
774 constructors => \%float_binop_constructors,
778 irn_flags => [ "rematerializable" ],
779 emit => '. fdiv%FPM %S0, %S1, %D0',
780 attr_type => "sparc_fp_attr_t",
781 attr => "ir_mode *fp_mode",
782 ins => [ "left", "right" ],
783 outs => [ "res", "M" ],
786 reg_req => { in => [ "fp", "fp" ], out => [ "fp", "none" ] },
789 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2", "none" ] },
792 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4", "none" ] },
798 irn_flags => [ "rematerializable" ],
799 reg_req => { in => [ "fp" ], out => [ "fp" ] },
800 # note that we only need the first register even for wide-values
801 emit => '. fnegs %S0, %D0',
802 attr_type => "sparc_fp_attr_t",
803 attr => "ir_mode *fp_mode",
805 constructors => \%float_unop_constructors,
809 irn_flags => [ "rematerializable" ],
810 # note that we only need the first register even for wide-values
811 emit => '. fabs %S0, %D0',
812 attr_type => "sparc_fp_attr_t",
813 attr => "ir_mode *fp_mode",
815 constructors => \%float_unop_constructors,
819 irn_flags => [ "rematerializable" ],
820 emit => '. f%FCONVS%.to%FCONVD %S0, %D0',
821 attr_type => "sparc_fp_conv_attr_t",
822 attr => "ir_mode *src_mode, ir_mode *dest_mode",
825 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
829 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
833 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
837 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|4" ] },
841 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
845 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|2" ] },
852 irn_flags => [ "rematerializable" ],
853 emit => '. fito%FPM %S0, %D0',
854 attr_type => "sparc_fp_attr_t",
855 attr => "ir_mode *fp_mode",
858 reg_req => { in => [ "fp" ], out => [ "fp" ] },
862 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
866 reg_req => { in => [ "fp" ], out => [ "fp:a|4" ] },
873 irn_flags => [ "rematerializable" ],
874 emit => '. f%FPM%.toi %S0, %D0',
875 attr_type => "sparc_fp_attr_t",
876 attr => "ir_mode *fp_mode",
880 reg_req => { in => [ "fp" ], out => [ "fp" ] },
883 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
886 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
892 op_flags => [ "uses_memory" ],
893 state => "exc_pinned",
896 reg_req => { in => [ "gp", "none" ], out => [ "fp", "none" ] },
899 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|2", "none" ] },
902 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|4", "none" ] },
905 ins => [ "ptr", "mem" ],
906 outs => [ "res", "M" ],
907 attr_type => "sparc_load_store_attr_t",
908 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
909 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
910 emit => '. ld%FLSM [%S0%O1], %D0'
914 op_flags => [ "uses_memory" ],
915 state => "exc_pinned",
918 reg_req => { in => [ "fp", "gp", "none" ], out => [ "none" ] },
921 reg_req => { in => [ "fp:a|2", "gp", "none" ], out => [ "none" ] },
924 reg_req => { in => [ "fp:a|4", "gp", "none" ], out => [ "none" ] },
927 ins => [ "val", "ptr", "mem" ],
929 attr_type => "sparc_load_store_attr_t",
930 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
931 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
932 emit => '. st%FLSM %S0, [%S1%O2]',