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 => 31 },
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 has_delay_slot => "(arch_irn_flags_t)sparc_arch_irn_flag_has_delay_slot",
132 my %cmp_operand_constructors = (
134 attr => "ir_entity *immediate_entity, int32_t immediate_value",
135 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
136 reg_req => { in => [ "gp" ], out => [ "flags" ] },
140 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
141 ins => [ "left", "right" ],
145 my %binop_operand_constructors = (
147 attr => "ir_entity *immediate_entity, int32_t immediate_value",
148 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
149 reg_req => { in => [ "gp" ], out => [ "gp" ] },
153 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
154 ins => [ "left", "right" ],
158 my %binopcc_operand_constructors = (
160 attr => "ir_entity *immediate_entity, int32_t immediate_value",
161 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
162 reg_req => { in => [ "gp" ], out => [ "gp", "flags" ] },
166 reg_req => { in => [ "gp", "gp" ], out => [ "gp", "flags" ] },
167 ins => [ "left", "right" ],
171 my %binopx_operand_constructors = (
173 attr => "ir_entity *immediate_entity, int32_t immediate_value",
174 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
175 reg_req => { in => [ "gp", "flags" ], out => [ "gp" ] },
176 ins => [ "left", "carry" ],
179 reg_req => { in => [ "gp", "gp", "flags" ], out => [ "gp" ] },
180 ins => [ "left", "right", "carry" ],
185 my %binopcczero_operand_constructors = (
187 attr => "ir_entity *immediate_entity, int32_t immediate_value",
188 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
189 reg_req => { in => [ "gp" ], out => [ "flags" ] },
193 reg_req => { in => [ "gp", "gp" ], out => [ "flags" ] },
194 ins => [ "left", "right" ],
198 my %div_operand_constructors = (
200 attr => "ir_entity *immediate_entity, int32_t immediate_value",
201 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
202 reg_req => { in => [ "gp", "gp" ], out => [ "gp" ] },
205 reg_req => { in => [ "gp", "gp", "gp" ], out => [ "gp" ] },
209 my %float_binop_constructors = (
211 reg_req => { in => [ "fp", "fp" ], out => [ "fp" ] },
215 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2" ] },
219 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4" ] },
224 my %float_unop_constructors = (
226 reg_req => { in => [ "fp" ], out => [ "fp" ] },
230 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|2" ] },
234 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|4" ] },
242 irn_flags => [ "rematerializable" ],
244 emit => 'add %S0, %SI1, %D0',
245 constructors => \%binop_operand_constructors,
249 irn_flags => [ "rematerializable" ],
250 emit => 'addcc %S0, %SI1, %D0',
251 outs => [ "res", "flags" ],
252 constructors => \%binopcc_operand_constructors,
256 irn_flags => [ "rematerializable" ],
257 emit => 'addcc %S0, %SI1, %%g0',
259 constructors => \%binopcczero_operand_constructors,
263 # At the moment not rematerializable because of assert in beflags.c/
264 # (it claims that spiller can't rematerialize flag stuff correctly)
265 #irn_flags => [ "rematerializable" ],
266 emit => 'addx %S0, %SI1, %D0',
267 constructors => \%binopx_operand_constructors,
272 ins => [ "left", "right" ],
273 outs => [ "res", "flags" ],
279 ins => [ "left", "right", "flags_input" ],
285 irn_flags => [ "rematerializable" ],
287 emit => 'sub %S0, %SI1, %D0',
288 constructors => \%binop_operand_constructors,
292 irn_flags => [ "rematerializable" ],
293 emit => 'subcc %S0, %SI1, %D0',
294 outs => [ "res", "flags" ],
295 constructors => \%binopcc_operand_constructors,
299 irn_flags => [ "rematerializable" ],
300 emit => 'subcc %S0, %SI1, %%g0',
302 constructors => \%binopcczero_operand_constructors,
306 # Not rematerializable (see AddX)
307 emit => 'subx %S0, %SI1, %D0',
308 constructors => \%binopx_operand_constructors,
313 ins => [ "left", "right" ],
314 outs => [ "res", "flags" ],
320 ins => [ "left", "right", "flags_input" ],
327 op_flags => [ "uses_memory" ],
328 state => "exc_pinned",
331 reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
332 ins => [ "ptr", "mem" ],
333 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
334 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
337 reg_req => { in => [ "gp", "gp", "none" ], out => [ "gp", "none" ] },
338 ins => [ "ptr", "ptr2", "mem" ],
339 attr => "ir_mode *ls_mode",
340 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
343 ins => [ "ptr", "mem" ],
344 outs => [ "res", "M" ],
345 attr_type => "sparc_load_store_attr_t",
346 emit => 'ld%ML [%S0%O1], %D0'
350 irn_flags => [ "rematerializable" ],
353 reg_req => { in => [], out => [ "gp" ] },
354 attr => "ir_entity *entity, int32_t immediate_value",
355 custominit => "sparc_set_attr_imm(res, entity, immediate_value);",
356 emit => 'sethi %H, %D0'
360 op_flags => [ "uses_memory" ],
362 state => "exc_pinned",
365 reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
366 ins => [ "val", "ptr", "mem" ],
367 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
368 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
371 reg_req => { in => [ "gp", "gp", "gp", "none" ], out => [ "none" ] },
372 ins => [ "val", "ptr", "ptr2", "mem" ],
373 attr => "ir_mode *ls_mode",
374 custominit => "init_sparc_load_store_attributes(res, ls_mode, NULL, 0, false, true);",
377 ins => [ "val", "ptr", "mem" ],
379 attr_type => "sparc_load_store_attr_t",
380 emit => 'st%MS %S0, [%S1%O2]'
384 emit => 'save %S0, %SI1, %D0',
389 attr => "ir_entity *immediate_entity, int32_t immediate_value",
390 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
391 reg_req => { in => [ "sp" ], out => [ "sp:I|S" ] },
395 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
396 ins => [ "stack", "increment" ],
403 outs => [ "stack", "res" ],
406 attr => "ir_entity *immediate_entity, int32_t immediate_value",
407 custominit => "sparc_set_attr_imm(res, immediate_entity, immediate_value);",
408 reg_req => { in => [ "sp", "frame_pointer", "gp" ], out => [ "sp:I|S", "gp" ] },
409 ins => [ "stack", "frame_pointer", "left" ],
412 reg_req => { in => [ "sp", "frame_pointer", "gp", "gp" ], out => [ "sp:I|S", "gp" ] },
413 ins => [ "stack", "frame_pointer", "left", "right" ],
419 reg_req => { in => [ "sp", "frame_pointer" ], out => [ "sp:I|S" ] },
420 ins => [ "stack", "frame_pointer" ],
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", "none" ], out => [ "sp:I|S", "gp", "none" ] },
432 ins => [ "stack", "mem" ],
435 reg_req => { in => [ "sp", "gp", "none" ], out => [ "sp:I|S", "gp", "none" ] },
436 ins => [ "stack", "size", "mem" ],
439 outs => [ "stack", "addr", "M" ],
443 reg_req => { in => [ "sp", "gp" ], out => [ "sp:I|S" ] },
444 ins => [ "stack", "size" ],
446 emit => "add %S0, %S1, %D0\n",
451 op_flags => [ "constlike" ],
452 irn_flags => [ "rematerializable" ],
453 attr => "ir_entity *entity, int32_t offset",
454 reg_req => { in => [ "gp" ], out => [ "gp" ] },
456 attr_type => "sparc_attr_t",
457 custominit => "sparc_set_attr_imm(res, entity, offset);",
462 op_flags => [ "cfopcode", "forking" ],
463 irn_flags => [ "has_delay_slot" ],
466 attr_type => "sparc_jmp_cond_attr_t",
467 attr => "ir_relation relation, bool is_unsigned",
468 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, is_unsigned);",
469 reg_req => { in => [ "flags" ], out => [ "none", "none" ] },
471 outs => [ "false", "true" ],
475 op_flags => [ "cfopcode", "forking" ],
476 irn_flags => [ "has_delay_slot" ],
479 attr_type => "sparc_jmp_cond_attr_t",
480 attr => "ir_relation relation",
481 init_attr => "\tinit_sparc_jmp_cond_attr(res, relation, false);",
482 reg_req => { in => [ "fpflags" ], out => [ "none", "none" ] },
484 outs => [ "false", "true" ],
488 # Note: has_delay_slot depends on wether it is a fallthrough or not, so we
489 # have special code for this in sparc_emitter
491 op_flags => [ "cfopcode" ],
492 irn_flags => [ "simple_jump" ],
493 reg_req => { out => [ "none" ] },
499 out_arity => "variable",
503 # This is a Jump instruction, but with the addition that you can add custom
504 # register constraints to model your calling conventions
507 op_flags => [ "cfopcode" ],
508 irn_flags => [ "has_delay_slot" ],
513 attr => "ir_entity *entity, int32_t offset",
514 custominit => "\tsparc_set_attr_imm(res, entity, offset);",
516 reg_req => { out => [ "none" ] },
520 reg_req => { out => [ "none" ] },
525 # This is a JumpLink instruction, but with the addition that you can add custom
526 # register constraints to model your calling conventions
528 irn_flags => [ "has_delay_slot" ],
529 state => "exc_pinned",
531 out_arity => "variable",
534 attr => "ir_entity *entity, int32_t offset, bool aggregate_return",
535 custominit => "\tsparc_set_attr_imm(res, entity, offset);".
536 "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
538 out_arity => "variable",
541 attr => "bool aggregate_return",
543 out_arity => "variable",
544 custominit => "\tif (aggregate_return) arch_add_irn_flags(res, (arch_irn_flags_t)sparc_arch_irn_flag_aggregate_return);",
549 Cmp => { # aka SubccZero
550 irn_flags => [ "rematerializable" ],
551 emit => 'cmp %S0, %SI1',
553 constructors => \%binopcczero_operand_constructors,
557 op_flags => [ "cfopcode", "forking" ],
558 irn_flags => [ "has_delay_slot" ],
561 reg_req => { in => [ "gp" ], out => [ ] },
562 out_arity => "variable",
563 attr_type => "sparc_switch_jmp_attr_t",
564 attr => "const ir_switch_table *table, ir_entity *jump_table",
568 irn_flags => [ "rematerializable" ],
570 emit => 'sll %S0, %SI1, %D0',
571 constructors => \%binop_operand_constructors,
575 irn_flags => [ "rematerializable" ],
577 emit => 'srl %S0, %SI1, %D0',
578 constructors => \%binop_operand_constructors,
582 irn_flags => [ "rematerializable" ],
584 emit => 'sra %S0, %SI1, %D0',
585 constructors => \%binop_operand_constructors,
589 irn_flags => [ "rematerializable" ],
591 emit => 'and %S0, %SI1, %D0',
592 constructors => \%binop_operand_constructors,
596 irn_flags => [ "rematerializable" ],
597 emit => 'andcc %S0, %SI1, %%g0',
599 constructors => \%binopcczero_operand_constructors,
603 irn_flags => [ "rematerializable" ],
605 emit => 'andn %S0, %SI1, %D0',
606 constructors => \%binop_operand_constructors,
610 irn_flags => [ "rematerializable" ],
611 emit => 'andncc %S0, %SI1, %%g0',
613 constructors => \%binopcczero_operand_constructors,
617 irn_flags => [ "rematerializable" ],
619 emit => 'or %S0, %SI1, %D0',
620 constructors => \%binop_operand_constructors,
624 irn_flags => [ "rematerializable" ],
625 emit => 'orcc %S0, %SI1, %%g0',
627 constructors => \%binopcczero_operand_constructors,
631 irn_flags => [ "rematerializable" ],
633 emit => 'orn %S0, %SI1, %D0',
634 constructors => \%binop_operand_constructors,
638 irn_flags => [ "rematerializable" ],
639 emit => 'orncc %S0, %SI1, %%g0',
641 constructors => \%binopcczero_operand_constructors,
645 irn_flags => [ "rematerializable" ],
647 emit => 'xor %S0, %SI1, %D0',
648 constructors => \%binop_operand_constructors,
652 irn_flags => [ "rematerializable" ],
653 emit => 'xorcc %S0, %SI1, %%g0',
655 constructors => \%binopcczero_operand_constructors,
659 irn_flags => [ "rematerializable" ],
661 emit => 'xnor %S0, %SI1, %D0',
662 constructors => \%binop_operand_constructors,
666 irn_flags => [ "rematerializable" ],
667 emit => 'xnorcc %S0, %SI1, %%g0',
669 constructors => \%binopcczero_operand_constructors,
673 irn_flags => [ "rematerializable" ],
675 emit => 'smul %S0, %SI1, %D0',
676 constructors => \%binop_operand_constructors,
680 irn_flags => [ "rematerializable" ],
681 emit => 'smulcc %S0, %SI1, %%g0',
683 constructors => \%binopcczero_operand_constructors,
687 irn_flags => [ "rematerializable" ],
688 outs => [ "low", "high" ],
689 emit => 'smul %S0, %SI1, %D0\n'.
691 constructors => \%binop_operand_constructors,
695 irn_flags => [ "rematerializable" ],
696 outs => [ "low", "high" ],
697 emit => 'umul %S0, %SI1, %D0\n'.
699 constructors => \%binop_operand_constructors,
703 irn_flags => [ "rematerializable", "has_delay_slot" ],
704 state => "exc_pinned",
705 ins => [ "dividend_high", "dividend_low", "divisor" ],
706 outs => [ "res", "M" ],
707 constructors => \%div_operand_constructors,
711 irn_flags => [ "rematerializable", "has_delay_slot" ],
712 state => "exc_pinned",
713 ins => [ "dividend_high", "dividend_low", "divisor" ],
714 outs => [ "res", "M" ],
715 constructors => \%div_operand_constructors,
719 irn_flags => [ "rematerializable" ],
720 emit => 'fcmp%FM %S0, %S1',
721 attr_type => "sparc_fp_attr_t",
722 attr => "ir_mode *fp_mode",
723 mode => $mode_fpflags,
726 reg_req => { in => [ "fp", "fp" ], out => [ "fpflags" ] },
729 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fpflags" ] },
732 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fpflags" ] },
738 op_flags => [ "commutative" ],
739 irn_flags => [ "rematerializable" ],
740 emit => 'fadd%FM %S0, %S1, %D0',
741 attr_type => "sparc_fp_attr_t",
742 attr => "ir_mode *fp_mode",
743 ins => [ "left", "right" ],
744 constructors => \%float_binop_constructors,
748 irn_flags => [ "rematerializable" ],
749 emit => 'fsub%FM %S0, %S1, %D0',
750 attr_type => "sparc_fp_attr_t",
751 attr => "ir_mode *fp_mode",
752 ins => [ "left", "right" ],
753 constructors => \%float_binop_constructors,
757 irn_flags => [ "rematerializable" ],
758 op_flags => [ "commutative" ],
759 emit =>'fmul%FM %S0, %S1, %D0',
760 attr_type => "sparc_fp_attr_t",
761 attr => "ir_mode *fp_mode",
762 ins => [ "left", "right" ],
763 constructors => \%float_binop_constructors,
767 irn_flags => [ "rematerializable" ],
768 emit => 'fdiv%FM %S0, %S1, %D0',
769 attr_type => "sparc_fp_attr_t",
770 attr => "ir_mode *fp_mode",
771 ins => [ "left", "right" ],
772 outs => [ "res", "M" ],
775 reg_req => { in => [ "fp", "fp" ], out => [ "fp", "none" ] },
778 reg_req => { in => [ "fp:a|2", "fp:a|2" ], out => [ "fp:a|2", "none" ] },
781 reg_req => { in => [ "fp:a|4", "fp:a|4" ], out => [ "fp:a|4", "none" ] },
787 irn_flags => [ "rematerializable" ],
788 reg_req => { in => [ "fp" ], out => [ "fp" ] },
789 # note that we only need the first register even for wide-values
790 emit => 'fnegs %S0, %D0',
791 attr_type => "sparc_fp_attr_t",
792 attr => "ir_mode *fp_mode",
794 constructors => \%float_unop_constructors,
798 irn_flags => [ "rematerializable" ],
799 # note that we only need the first register even for wide-values
800 emit => 'fabs %S0, %D0',
801 attr_type => "sparc_fp_attr_t",
802 attr => "ir_mode *fp_mode",
804 constructors => \%float_unop_constructors,
808 irn_flags => [ "rematerializable" ],
809 emit => 'f%FSto%FD %S0, %D0',
810 attr_type => "sparc_fp_conv_attr_t",
811 attr => "ir_mode *src_mode, ir_mode *dest_mode",
814 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
818 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
822 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
826 reg_req => { in => [ "fp:a|2" ], out => [ "fp:a|4" ] },
830 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
834 reg_req => { in => [ "fp:a|4" ], out => [ "fp:a|2" ] },
841 irn_flags => [ "rematerializable" ],
842 emit => 'fito%FM %S0, %D0',
843 attr_type => "sparc_fp_attr_t",
844 attr => "ir_mode *fp_mode",
847 reg_req => { in => [ "fp" ], out => [ "fp" ] },
851 reg_req => { in => [ "fp" ], out => [ "fp:a|2" ] },
855 reg_req => { in => [ "fp" ], out => [ "fp:a|4" ] },
862 irn_flags => [ "rematerializable" ],
863 emit => 'f%FMtoi %S0, %D0',
864 attr_type => "sparc_fp_attr_t",
865 attr => "ir_mode *fp_mode",
869 reg_req => { in => [ "fp" ], out => [ "fp" ] },
872 reg_req => { in => [ "fp:a|2" ], out => [ "fp" ] },
875 reg_req => { in => [ "fp:a|4" ], out => [ "fp" ] },
881 op_flags => [ "uses_memory" ],
882 state => "exc_pinned",
885 reg_req => { in => [ "gp", "none" ], out => [ "fp", "none" ] },
888 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|2", "none" ] },
891 reg_req => { in => [ "gp", "none" ], out => [ "fp:a|4", "none" ] },
894 ins => [ "ptr", "mem" ],
895 outs => [ "res", "M" ],
896 attr_type => "sparc_load_store_attr_t",
897 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
898 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
899 emit => 'ld%ML [%S0%O1], %D0'
903 op_flags => [ "uses_memory" ],
904 state => "exc_pinned",
907 reg_req => { in => [ "fp", "gp", "none" ], out => [ "none" ] },
910 reg_req => { in => [ "fp:a|2", "gp", "none" ], out => [ "none" ] },
913 reg_req => { in => [ "fp:a|4", "gp", "none" ], out => [ "none" ] },
916 ins => [ "val", "ptr", "mem" ],
918 attr_type => "sparc_load_store_attr_t",
919 attr => "ir_mode *ls_mode, ir_entity *entity, int32_t offset, bool is_frame_entity",
920 custominit => "init_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity, false);",
921 emit => 'st%MS %S0, [%S1%O2]',