Do not warn about wrong register for a Phi input if that register is a joker (i.e...
[libfirm] / ir / be / scripts / generate_new_opcodes.pl
index 85e2627..1a634a6 100755 (executable)
@@ -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;
@@ -708,6 +717,8 @@ void $arch\_create_opcodes(const arch_irn_ops_t *be_ops) {
 #define K   irop_flag_keep
 #define M   irop_flag_machine
 #define O   irop_flag_machine_op
+#define NB  irop_flag_dump_noblock
+#define NI  irop_flag_dump_noinput
 #define R   (irop_flag_user << 0)
 
        ir_op_ops  ops;
@@ -1173,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 = <<EOF;
-{
-       arch_register_req_type_should_be_different_from_all,
-       & ${arch}_reg_classes[CLASS_${arch}_${class}],
-       NULL,        /* limit bitset */
-       0,           /* same pos */
-       0            /* different pos */
-};
-
 EOF
        } elsif (is_reg_class($reqs)) {
                $class  = $reqs;
@@ -1218,7 +1214,7 @@ EOF
                        push(@req_type_mask, "arch_register_req_type_should_be_same");
                }
                if ($different_pos != 0) {
-                       push(@req_type_mask, "arch_register_req_type_should_be_different");
+                       push(@req_type_mask, "arch_register_req_type_must_be_different");
                }
                my $reqtype      = join(" | ", @req_type_mask);