summaryrefslogtreecommitdiff
path: root/scripts/checkstack.pl
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-01-04 16:58:49 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-10-11 12:16:56 +0200
commit0367d89274d47941b1bc02e35ddad24077de3ce7 (patch)
tree45b31f6d65028d0b7b8919aa3b84ffdd84555573 /scripts/checkstack.pl
parent6fcf0615117dcfa126083f2163c4dcea3098bbe3 (diff)
downloadlwn-0367d89274d47941b1bc02e35ddad24077de3ce7.tar.gz
lwn-0367d89274d47941b1bc02e35ddad24077de3ce7.zip
[AVR32] checkstack support
Add regexes to recognize stack frame adjustments in AVR32 code. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'scripts/checkstack.pl')
-rwxr-xr-xscripts/checkstack.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index f7844f6aa487..663158627155 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -12,6 +12,7 @@
# sh64 port by Paul Mundt
# Random bits by Matt Mackall <mpm@selenic.com>
# M68k port by Geert Uytterhoeven and Andreas Schwab
+# AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com>
#
# Usage:
# objdump -d vmlinux | stackcheck.pl [arch]
@@ -37,6 +38,10 @@ my (@stack, $re, $x, $xs);
if ($arch eq 'arm') {
#c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
+ } elsif ($arch eq 'avr32') {
+ #8000008a: 20 1d sub sp,4
+ #80000ca8: fa cd 05 b0 sub sp,sp,1456
+ $re = qr/^.*sub.*sp.*,([0-9]{1,8})/o;
} elsif ($arch =~ /^i[3456]86$/) {
#c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp
$re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%esp$/o;