diff options
author | Jon Hunter <jon-hunter@ti.com> | 2013-04-01 15:33:50 -0400 |
---|---|---|
committer | Jon Hunter <jon-hunter@ti.com> | 2013-04-01 15:33:50 -0400 |
commit | dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4 (patch) | |
tree | a3689b801070c1360b120b7280c6adc4de5f692a /scripts/checkstack.pl | |
parent | 71856843fb1d8ee455a4c1a60696c74afa4809e5 (diff) | |
parent | 31d9adca82ce65e5c99d045b5fd917c702b6fce3 (diff) |
Merge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp
Conflicts:
arch/arm/plat-omap/dmtimer.c
Diffstat (limited to 'scripts/checkstack.pl')
-rwxr-xr-x | scripts/checkstack.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 17e384396705..544aa56b6200 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl | |||
@@ -34,7 +34,7 @@ use strict; | |||
34 | # $1 (first bracket) matches the dynamic amount of the stack growth | 34 | # $1 (first bracket) matches the dynamic amount of the stack growth |
35 | # | 35 | # |
36 | # use anything else and feel the pain ;) | 36 | # use anything else and feel the pain ;) |
37 | my (@stack, $re, $dre, $x, $xs); | 37 | my (@stack, $re, $dre, $x, $xs, $funcre); |
38 | { | 38 | { |
39 | my $arch = shift; | 39 | my $arch = shift; |
40 | if ($arch eq "") { | 40 | if ($arch eq "") { |
@@ -44,6 +44,7 @@ my (@stack, $re, $dre, $x, $xs); | |||
44 | 44 | ||
45 | $x = "[0-9a-f]"; # hex character | 45 | $x = "[0-9a-f]"; # hex character |
46 | $xs = "[0-9a-f ]"; # hex character or space | 46 | $xs = "[0-9a-f ]"; # hex character or space |
47 | $funcre = qr/^$x* <(.*)>:$/; | ||
47 | if ($arch eq 'arm') { | 48 | if ($arch eq 'arm') { |
48 | #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64 | 49 | #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64 |
49 | $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o; | 50 | $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o; |
@@ -66,6 +67,10 @@ my (@stack, $re, $dre, $x, $xs); | |||
66 | # 2b6c: 4e56 fb70 linkw %fp,#-1168 | 67 | # 2b6c: 4e56 fb70 linkw %fp,#-1168 |
67 | # 1df770: defc ffe4 addaw #-28,%sp | 68 | # 1df770: defc ffe4 addaw #-28,%sp |
68 | $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o; | 69 | $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o; |
70 | } elsif ($arch eq 'metag') { | ||
71 | #400026fc: 40 00 00 82 ADD A0StP,A0StP,#0x8 | ||
72 | $re = qr/.*ADD.*A0StP,A0StP,\#(0x$x{1,8})/o; | ||
73 | $funcre = qr/^$x* <[^\$](.*)>:$/; | ||
69 | } elsif ($arch eq 'mips64') { | 74 | } elsif ($arch eq 'mips64') { |
70 | #8800402c: 67bdfff0 daddiu sp,sp,-16 | 75 | #8800402c: 67bdfff0 daddiu sp,sp,-16 |
71 | $re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o; | 76 | $re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o; |
@@ -109,7 +114,6 @@ my (@stack, $re, $dre, $x, $xs); | |||
109 | # | 114 | # |
110 | # main() | 115 | # main() |
111 | # | 116 | # |
112 | my $funcre = qr/^$x* <(.*)>:$/; | ||
113 | my ($func, $file, $lastslash); | 117 | my ($func, $file, $lastslash); |
114 | 118 | ||
115 | while (my $line = <STDIN>) { | 119 | while (my $line = <STDIN>) { |