my $b = substr $bytes, 0, 2;
$bytes = substr $bytes, 2, length($bytes)-2;
$raw_text{$raw_addr} = $b;
my $b = substr $bytes, 0, 2;
$bytes = substr $bytes, 2, length($bytes)-2;
$raw_text{$raw_addr} = $b;
# this is a strong sanity check-- if we've got something
# wrong it's highly unlikely that all jump table entries
# will point to actual instructions
# this is a strong sanity check-- if we've got something
# wrong it's highly unlikely that all jump table entries
# will point to actual instructions
# this is a strong sanity check-- if we've got something
# wrong it's highly unlikely that all jump table entries
# will point to actual instructions
# this is a strong sanity check-- if we've got something
# wrong it's highly unlikely that all jump table entries
# will point to actual instructions
if (defined($initial_stack_depth)) {
# FIXME: avr-gcc-412 initializes SP both in
# crt0 and in main(), we can believe the second one
if (defined($initial_stack_depth)) {
# FIXME: avr-gcc-412 initializes SP both in
# crt0 and in main(), we can believe the second one
$initial_stack_depth = $initial_depth;
replace_insn ($addr, $size, 0, "init_sp");
}
$initial_stack_depth = $initial_depth;
replace_insn ($addr, $size, 0, "init_sp");
}
@succ = @{$listref};
} elsif (is_fallthrough ($addr)) {
push @succ, ($addr + $insn_size{$addr});
@succ = @{$listref};
} elsif (is_fallthrough ($addr)) {
push @succ, ($addr + $insn_size{$addr});
} else {
my $target_func = $ICALL_TARGETS{$last_label};
if (defined($target_func)) {
$target = $label_to_addr{$target_func};
} else {
my $target_func = $ICALL_TARGETS{$last_label};
if (defined($target_func)) {
$target = $label_to_addr{$target_func};
my $lref = pop (@worklist);
(my $addr, my $old_depth) = @{$lref};
my $lref = pop (@worklist);
(my $addr, my $old_depth) = @{$lref};
my $hex_addr = sprintf "%x", $addr;
if (!defined($insns{$addr})) {
my $hex_addr = sprintf "%x", $addr;
if (!defined($insns{$addr})) {
- die "FAIL" if ($vec_type ne "func");
- die "FAIL -- unbalanced stack on return from $func_name" if ($new_depth != 0);
+ die "tos-ramsize FAIL" if ($vec_type ne "func");
+ die "tos-ramsize FAIL -- unbalanced stack on return from $func_name" if ($new_depth != 0);
print " $addr_to_label{$f} $f -> $addr_to_label{$found} $found\n";
$f = $found;
}
print " $addr_to_label{$f} $f -> $addr_to_label{$min_func} $min_func\n";
print " $addr_to_label{$f} $f -> $addr_to_label{$found} $found\n";
$f = $found;
}
print " $addr_to_label{$f} $f -> $addr_to_label{$min_func} $min_func\n";
print "BSS segment size is ${bss_size}, data segment size is ${data_size}\n";
}
print "The upper bound on stack size is ${total_depth}\n";
print "BSS segment size is ${bss_size}, data segment size is ${data_size}\n";
}
print "The upper bound on stack size is ${total_depth}\n";