Some backends create nodes in their lower_for_target phases already.
These nodes are placeholders for real backend nodes later, in contrast
they do not have register requirements or backend attributes. Simplified
this by allowing custom dumpers for them and leaving out the backend
node structs.
- op_flags => [ "constlike" ],
- reg_req => { in => [ "none", "none" ], out => [ "none" ] },
ins => [ "left", "right" ],
ins => [ "left", "right" ],
+ attr_type => "",
+ dump_func => "NULL",
- reg_req => { in => [ "none", "none", "none" ], out => [ "none" ] },
ins => [ "left", "right", "eflags" ],
ins => [ "left", "right", "eflags" ],
+ attr_type => "",
+ dump_func => "NULL",
- # we should not rematrialize this node. It produces 2 results and has
- # very strict constraints
- op_flags => [ "constlike" ],
- cmp_attr => "return 1;",
- reg_req => { in => [ "none", "none" ],
- out => [ "none", "none", "none", "none" ] },
ins => [ "left", "right" ],
outs => [ "res_low", "flags", "M", "res_high" ],
ins => [ "left", "right" ],
outs => [ "res_low", "flags", "M", "res_high" ],
+ attr_type => "",
+ dump_func => "NULL",
- op_flags => [ "constlike" ],
- cmp_attr => "return 1;",
- reg_req => { in => [ "none", "none" ],
- out => [ "none", "none", "none", "none" ] },
ins => [ "left", "right" ],
outs => [ "res_low", "flags", "M", "res_high" ],
ins => [ "left", "right" ],
outs => [ "res_low", "flags", "M", "res_high" ],
+ attr_type => "",
+ dump_func => "NULL",
- reg_req => { in => [ "none", "none" ], out => [ "none" ] },
ins => [ "minuend", "subtrahend" ],
ins => [ "minuend", "subtrahend" ],
+ attr_type => "",
+ dump_func => "NULL",
- reg_req => { in => [ "none", "none", "none" ], out => [ "none" ] },
ins => [ "minuend", "subtrahend", "eflags" ],
ins => [ "minuend", "subtrahend", "eflags" ],
+ attr_type => "",
+ dump_func => "NULL",
modified_flags => $status_flags
},
modified_flags => $status_flags
},
+l_Setcc => {
+ ins => [ "cond" ],
+ outs => [ "res" ],
+ mode => "mode_Bu",
+ attr_type => "",
+ dump_func => "NULL",
+},
+
Setcc => {
#irn_flags => [ "rematerializable" ],
reg_req => { in => [ "eflags" ], out => [ "eax ebx ecx edx" ] },
Setcc => {
#irn_flags => [ "rematerializable" ],
reg_req => { in => [ "eflags" ], out => [ "eax ebx ecx edx" ] },
- op_flags => [ "labeled" ],
- cmp_attr => "return 1;",
ins => [ "val_high", "val_low" ],
ins => [ "val_high", "val_low" ],
- reg_req => { in => [ "none", "none" ], out => [ "none" ] }
+ attr_type => "",
+ dump_func => "NULL",
- op_flags => [ "labeled" ],
- cmp_attr => "return 1;",
ins => [ "val" ],
outs => [ "res_high", "res_low" ],
ins => [ "val" ],
outs => [ "res_high", "res_low" ],
- reg_req => { in => [ "none" ], out => [ "none", "none" ] }
+ attr_type => "",
+ dump_func => "NULL",
}
# set default values for state and flags if not given
}
# set default values for state and flags if not given
- $n{"state"} = "floats" if (! exists($n{"state"}));
- $n{"op_flags"} = ["none"] if (! exists($n{"op_flags"}));
+ $n{"state"} = "floats" if (! exists($n{"state"}));
+ $n{"op_flags"} = ["none"] if (! exists($n{"op_flags"}));
+ $n{"dump_func"} = "${arch}_dump_node" if (!exists($n{"dump_func"}));
+ my $dump_func = $n{"dump_func"};
push(@obst_new_irop, "\n\tmemset(&ops, 0, sizeof(ops));\n");
push(@obst_new_irop, "\tops.be_ops = be_ops;\n");
push(@obst_new_irop, "\n\tmemset(&ops, 0, sizeof(ops));\n");
push(@obst_new_irop, "\tops.be_ops = be_ops;\n");
- push(@obst_new_irop, "\tops.dump_node = $arch\_dump_node;\n");
+ push(@obst_new_irop, "\tops.dump_node = ${dump_func};\n");
if (defined($cmp_attr_func)) {
push(@obst_new_irop, "\tops.node_cmp_attr = ${cmp_attr_func};\n");
if (defined($cmp_attr_func)) {
push(@obst_new_irop, "\tops.node_cmp_attr = ${cmp_attr_func};\n");
break;
case dump_node_info_txt:
break;
case dump_node_info_txt:
- if (is_sparc_AddX_t(n) || is_sparc_AddCC_t(n))
- break;
-
arch_dump_reqs_and_registers(F, n);
sparc_attr = get_sparc_attr_const(n);
if (sparc_attr->immediate_value_entity) {
arch_dump_reqs_and_registers(F, n);
sparc_attr = get_sparc_attr_const(n);
if (sparc_attr->immediate_value_entity) {
ins => [ "left", "right" ],
outs => [ "res", "flags" ],
attr_type => "",
ins => [ "left", "right" ],
outs => [ "res", "flags" ],
attr_type => "",
},
AddX_t => {
ins => [ "left", "right", "flags_input" ],
attr_type => "",
},
AddX_t => {
ins => [ "left", "right", "flags_input" ],
attr_type => "",
ins => [ "left", "right" ],
outs => [ "res", "flags" ],
attr_type => "",
ins => [ "left", "right" ],
outs => [ "res", "flags" ],
attr_type => "",
},
SubX_t => {
ins => [ "left", "right", "flags_input" ],
attr_type => "",
},
SubX_t => {
ins => [ "left", "right", "flags_input" ],
attr_type => "",