projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5843b50
)
allow specification of attribute copy functions
author
Matthias Braun
<matze@braunis.de>
Mon, 25 Jun 2007 23:10:22 +0000
(23:10 +0000)
committer
Matthias Braun
<matze@braunis.de>
Mon, 25 Jun 2007 23:10:22 +0000
(23:10 +0000)
[r14759]
ir/be/scripts/generate_new_opcodes.pl
patch
|
blob
|
history
diff --git
a/ir/be/scripts/generate_new_opcodes.pl
b/ir/be/scripts/generate_new_opcodes.pl
index
0e15336
..
8aedc39
100755
(executable)
--- a/
ir/be/scripts/generate_new_opcodes.pl
+++ b/
ir/be/scripts/generate_new_opcodes.pl
@@
-41,8
+41,10
@@
our %operands;
our %cpu;
our $default_attr_type;
our $default_cmp_attr;
our %cpu;
our $default_attr_type;
our $default_cmp_attr;
+our $default_copy_attr;
our %init_attr;
our %compare_attr;
our %init_attr;
our %compare_attr;
+our %copy_attr;
our %reg_classes;
# include spec file
our %reg_classes;
# include spec file
@@
-563,6
+565,13
@@
foreach my $op (keys(%nodes)) {
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");
}
+ my $copy_attr_func = $copy_attr{$attr_type};
+ if (!defined($copy_attr_func)) {
+ $copy_attr_func = $default_copy_attr;
+ }
+ if (defined($copy_attr_func)) {
+ push(@obst_new_irop, "\tops.copy_attr = ${copy_attr_func};\n");
+ }
$n_opcodes++;
my $n_res = $out_arity;
$n_opcodes++;
my $n_res = $out_arity;