no strict "subs";
unless ($return = do $specfile) {
- die "couldn't parse $specfile: $@" if $@;
- die "couldn't do $specfile: $!" unless defined $return;
- die "couldn't run $specfile" unless $return;
+ die "Fatal error: couldn't parse $specfile: $@" if $@;
+ die "Fatal error: couldn't do $specfile: $!" unless defined $return;
+ die "Fatal error: couldn't run $specfile" unless $return;
}
use strict "subs";
if ($new_emit_syntax) {
my $newscript = dirname($myname) . "/generate_emitter_new.pl";
unless ($return = do "$newscript") {
- die "couldn't parse $newscript: $@" if $@;
- die "couldn't do $newscript: $!" unless defined $return;
- die "couldn't run $newscript" unless $return;
+ die "Fatal error: couldn't parse $newscript: $@" if $@;
+ die "Fatal error: couldn't do $newscript: $!" unless defined $return;
+ die "Fatal error: couldn't run $newscript" unless $return;
}
exit;
}
push(@obst_func, "}\n\n");
}
-open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
+open(OUT, ">$target_h") || die("Fatal error: Could not open $target_h, reason: $!\n");
my $creation_time = localtime(time());
close(OUT);
-open(OUT, ">$target_c") || die("Could not open $target_c, reason: $!\n");
+open(OUT, ">$target_c") || die("Fatal error: Could not open $target_c, reason: $!\n");
$creation_time = localtime(time());
no strict "subs";
unless ($return = do $specfile) {
- die "couldn't parse $specfile: $@" if $@;
- die "couldn't do $specfile: $!" unless defined $return;
- die "couldn't run $specfile" unless $return;
+ die "Fatal error: couldn't parse $specfile: $@" if $@;
+ die "Fatal error: couldn't do $specfile: $!" unless defined $return;
+ die "Fatal error: couldn't run $specfile" unless $return;
}
use strict "subs";
push(@obst_unit_tp_defs, "};\n\n") if ($has_desc);
-open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
+open(OUT, ">$target_h") || die("Fatal error: Could not open $target_h, reason: $!\n");
my $creation_time = localtime(time());
close(OUT);
-open(OUT, ">$target_c") || die("Could not open $target_c, reason: $!\n");
+open(OUT, ">$target_c") || die("Fatal error: Could not open $target_c, reason: $!\n");
$creation_time = localtime(time());
no strict "subs";
unless ($return = do $specfile) {
- die "couldn't parse $specfile: $@" if $@;
- die "couldn't do $specfile: $!" unless defined $return;
- die "couldn't run $specfile" unless $return;
+ die "Fatal error: couldn't parse $specfile: $@" if $@;
+ die "Fatal error: couldn't do $specfile: $!" unless defined $return;
+ die "Fatal error: couldn't run $specfile" unless $return;
}
use strict "subs";
@outs = @{ $n{"outs"} };
if($out_arity >= 0 && scalar(@outs) != $out_arity) {
- die "Op ${op} has different number of outs and out_arity\n";
+ die "Fatal error: Op ${op} has different number of outs and out_arity\n";
}
$num_outs = $#outs + 1;
@ins = @{ $n{"ins"} };
if($arity >= 0 && scalar(@ins) != $arity) {
- die "Op ${op} has different number of ins and arity\n";
+ die "Fatal error: Op ${op} has different number of ins and arity\n";
}
push(@obst_proj, "\nenum n_$op {\n");
if(defined($compare_attr{${attr_type}})) {
$cmp_attr_func = $compare_attr{${attr_type}};
} else {
- die "No compare function defined for ${attr_type} attributes.";
+ die "Fatal error: No compare function defined for ${attr_type} attributes.";
}
}
if (@in) {
if($arity >= 0 && scalar(@in) != $arity) {
- die "Arity and number of in requirements don't match for ${op}\n";
+ die "Fatal error: Arity and number of in requirements don't match for ${op}\n";
}
$temp .= "\tstatic const arch_register_req_t *in_reqs[] =\n";
$temp .= "\t};\n";
} else {
if($arity > 0) {
- die "need in requirements for ${op}\n";
+ die "Fatal error: need in requirements for ${op}\n";
}
$temp .= "\tstatic const arch_register_req_t **in_reqs = NULL;\n";
}
if (@out) {
if($out_arity >= 0 && scalar(@out) != $out_arity) {
- die "Out-Arity and number of out requirements don't match for ${op}\n";
+ die "Fatal error: Out-Arity and number of out requirements don't match for ${op}\n";
}
$temp .= "\tstatic const arch_register_req_t *out_reqs[] =\n";
$temp .= "\t};\n";
} else {
if($out_arity > 0) {
- die "need out requirements for ${op}\n";
+ die "Fatal error: need out requirements for ${op}\n";
}
$temp .= "\tstatic const arch_register_req_t **out_reqs = NULL;\n";
}
# lookup init function
my $attr_init_code = $init_attr{$attr_type};
if(!defined($attr_init_code)) {
- die "Couldn't find attribute initialisation code for type '${attr_type}'";
+ die "Fatal error: Couldn't find attribute initialisation code for type '${attr_type}'";
}
$temp .= "${attr_init_code}\n";
$temp .= "\n";
# emit the code
-open(OUT, ">$target_c") || die("Could not open $target_c, reason: $!\n");
+open(OUT, ">$target_c") || die("Fatal error: Could not open $target_c, reason: $!\n");
print OUT "#include \"gen_$arch\_regalloc_if_t.h\"\n\n";
print OUT @obst_cmp_attr;
close(OUT);
-open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
+open(OUT, ">$target_h") || die("Fatal error: Could not open $target_h, reason: $!\n");
my $creation_time = localtime(time());
my $tmp = uc($arch);
} elsif ($arity == $ARITY_DYNAMIC) {
return "oparity_dynamic";
} else {
- die "Unknown arity $arity";
+ die "Fatal error: Unknown arity $arity";
}
}
use strict "subs";
unless ($return = do $specfile) {
- die "couldn't parse $specfile: $@" if $@;
- die "couldn't do $specfile: $!" unless defined $return;
- die "couldn't run $specfile" unless $return;
+ die "Fatal error: couldn't parse $specfile: $@" if $@;
+ die "Fatal error: couldn't do $specfile: $!" unless defined $return;
+ die "Fatal error: couldn't run $specfile" unless $return;
}
use strict "subs";
# generate header _t (internal usage) file
-open(OUT, ">$target_h_t") || die("Could not open $target_h_t, reason: $!\n");
+open(OUT, ">$target_h_t") || die("Fatal error: Could not open $target_h_t, reason: $!\n");
my $creation_time = localtime(time());
# generate header (external usage) file
-open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
+open(OUT, ">$target_h") || die("Fatal error: Could not open $target_h, reason: $!\n");
$creation_time = localtime(time());
# generate c file
-open(OUT, ">$target_c") || die("Could not open $target_c, reason: $!\n");
+open(OUT, ">$target_c") || die("Fatal error: Could not open $target_c, reason: $!\n");
$creation_time = localtime(time());
else {
$class = get_reg_class($reg);
if (!defined $class) {
- die("Could not get ".uc($inout)." register class for '$op' pos $idx (reg $reg) ... exiting.\n");
+ die("Fatal error: Could not get ".uc($inout)." register class for '$op' pos $idx (reg $reg) ... exiting.\n");
}
else {
last GET_CLASS;
my ($class, $has_limit, $same_pos, $different_pos) = build_subset_class_func($n, $op, $idx, (($inout eq "in") ? 1 : 0), $reqs[$idx]);
if (!defined($class)) {
- die("Could not build subset for ".uc($inout)." requirements '$op' pos $idx ... exiting.\n");
+ die("Fatal error: Could not build subset for ".uc($inout)." requirements '$op' pos $idx ... exiting.\n");
}
if ($has_limit) {