$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"})) {
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;
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;
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);