X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fscripts%2Fgenerate_new_opcodes.pl;h=1a634a6e37c5ba6b7623fdcf873022de63c0566a;hb=93da909d12b7bec51aa36ee5f05966c331f90fb9;hp=bbbec00af89e032fabe8bbf9bcf30fb0916260b7;hpb=670371d7dda251c25c443bd9da074a661172aea1;p=libfirm diff --git a/ir/be/scripts/generate_new_opcodes.pl b/ir/be/scripts/generate_new_opcodes.pl index bbbec00af..1a634a6e3 100755 --- a/ir/be/scripts/generate_new_opcodes.pl +++ b/ir/be/scripts/generate_new_opcodes.pl @@ -265,6 +265,12 @@ foreach my $op (keys(%nodes)) { $attr_type = $default_attr_type; } + # determine hash function + my $hash_func; + if (exists($n{"hash_func"})) { + $hash_func = $n{"hash_func"}; + } + # determine compare function my $cmp_attr_func; if (exists($n{"cmp_attr"})) { @@ -575,6 +581,9 @@ foreach my $op (keys(%nodes)) { if (defined($copy_attr_func)) { push(@obst_new_irop, "\tops.copy_attr = ${copy_attr_func};\n"); } + if (defined($hash_func)) { + push(@obst_new_irop, "\tops.hash = ${hash_func};\n"); + } $n_opcodes++; my $n_res = $out_arity; @@ -1175,21 +1184,6 @@ sub generate_requirements { 0 /* different pos */ }; -EOF - } elsif ($reqs =~ /^new_reg_(.*)$/) { - if(!is_reg_class($1)) { - die "$1 is not a register class in requirements for $op\n"; - } - $class = $1; - $result = <