From: Matthias Braun Date: Sun, 13 May 2007 15:13:50 +0000 (+0000) Subject: allow specification of names for in parameters in spec file X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8c62d67c5bd49d4df5534d8441d589d81eace851;p=libfirm allow specification of names for in parameters in spec file [r13838] --- diff --git a/ir/be/scripts/generate_new_opcodes.pl b/ir/be/scripts/generate_new_opcodes.pl index 4faf79b1c..37548e3dd 100755 --- a/ir/be/scripts/generate_new_opcodes.pl +++ b/ir/be/scripts/generate_new_opcodes.pl @@ -127,12 +127,27 @@ foreach my $op (keys(%nodes)) { push(@out_flags, $1); $outs[$idx] =~ s/:((S|I)(\|(S|I))*)//; } - push(@obst_proj, " pn_$op\_".$outs[$idx]." = $idx,\n"); + push(@obst_proj, "\tpn_$op\_".$outs[$idx]." = $idx,\n"); } push(@obst_proj, "};\n"); + # outs have names, it must be a mode_T node $known_mode = "mode_T"; } + if (exists($n{"ins"})) { + undef my @ins; + + @ins = @{ $n{"ins"} }; + my $num_ins = $#ins + 1; + + push(@obst_proj, "\nenum n_$op {\n"); + + for (my $idx = 0; $idx <= $#ins; $idx++) { + push(@obst_proj, "\tn_${op}_".$ins[$idx]." = $idx,\n"); + } + + push(@obst_proj, "};\n"); + } if (exists($n{"mode"})) { $known_mode = $n{"mode"}; }