$tmp .= " arch_register_req_type_none,\n";
$tmp .= " NULL,\n";
$tmp .= " NULL,\n";
-$tmp .= " 0\n";
+$tmp .= " NULL\n";
$tmp .= " },\n";
$tmp .= " 0\n";
$tmp .= "};\n\n";
$tmp .= " arch_register_req_type_normal,\n";
$tmp .= " $class_ptr,\n";
$tmp .= " NULL,\n";
- $tmp .= " 0\n";
+ $tmp .= " NULL\n";
$tmp .= " },\n";
$tmp .= " 0\n";
$tmp .= "};\n\n";
push(@obst_req, $tmp);
- push(@obst_header_all, "\nextern const arch_register_req_t ia32_default_req_$class_name;\n");
+ push(@obst_header_all, "\nextern const $arch\_register_req_t $arch\_default_req_$class_name;\n");
my $idx = 0;
push(@obst_reginit, " /* Init of all registers in class '$class_name' */\n\n");
$tmp .= " arch_register_req_type_limited,\n";
$tmp .= " $class_ptr,\n";
$tmp .= " $limit_func_name,\n";
- $tmp .= " 0\n";
+ $tmp .= " NULL\n";
$tmp .= " },\n";
$tmp .= " 0\n";
$tmp .= "};\n\n";
*/
#include "../bearch.h"
+#include "$arch\_nodes_attr.h"
EOF
$tmp2 .= " {\n";
$tmp2 .= " ".join(" | ", @req_type_mask).",\n";
$tmp2 .= " &$arch\_reg_classes[CLASS_$arch\_".$class."],\n";
- $tmp2 .= " ".(defined($class) ? "limit_reg_".$op."_$inout\_".$idx : "NULL").",\n";
+ $tmp2 .= " ".($has_limit ? "limit_reg_".$op."_$inout\_".$idx : "NULL").",\n";
$tmp2 .= " NULL\n";
$tmp2 .= " },\n";
$tmp2 .= " ".(defined($pos) ? $pos : "0")."\n};\n";