History

[AVR32] checkstack support

Add regexes to recognize stack frame adjustments in AVR32 code.

Haavard Skinnemoen committed 20 years ago

Commit 0367d891 parent 6fcf0611 file · +5 −0Browse files

Showing the changes to scripts/checkstack.pl (1 of 1 file). Show all

Unified · Split

scripts/checkstack.pl+5−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212 # sh64 port by Paul Mundt
1313 # Random bits by Matt Mackall <mpm@selenic.com>
1414 # M68k port by Geert Uytterhoeven and Andreas Schwab
15+# AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com>
1516 #
1617 # Usage:
1718 # objdump -d vmlinux | stackcheck.pl [arch]
@@ -37,6 +38,10 @@ my (@stack, $re, $x, $xs); · 19 unmodified lines
3738 if ($arch eq 'arm') {
3839 #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
3940 $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
41+ } elsif ($arch eq 'avr32') {
42+ #8000008a: 20 1d sub sp,4
43+ #80000ca8: fa cd 05 b0 sub sp,sp,1456
44+ $re = qr/^.*sub.*sp.*,([0-9]{1,8})/o;
4045 } elsif ($arch =~ /^i[3456]86$/) {
4146 #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp
4247 $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%esp$/o;