Skip to content

Commit f1733a1

Browse files
Qian Caitorvalds
authored andcommitted
checkstack.pl: fix for aarch64
There is actually a space after "sp," like this, ffff2000080813c8: a9bb7bf stp x29, x30, [sp, #-80]! Right now, checkstack.pl isn't able to print anything on aarch64, because it won't be able to match the stating objdump line of a function due to this missing space. Hence, it displays every stack as zero-size. After this patch, checkpatch.pl is able to match the start of a function's objdump, and is then able to calculate each function's stack correctly. Link: http://lkml.kernel.org/r/20181207195843.38528-1-cai@lca.pw Signed-off-by: Qian Cai <cai@lca.pw> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 01e881f commit f1733a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/checkstack.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
$xs = "[0-9a-f ]"; # hex character or space
4848
$funcre = qr/^$x* <(.*)>:$/;
4949
if ($arch eq 'aarch64') {
50-
#ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp,#-80]!
51-
$re = qr/^.*stp.*sp,\#-([0-9]{1,8})\]\!/o;
50+
#ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]!
51+
$re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
5252
} elsif ($arch eq 'arm') {
5353
#c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
5454
$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;

0 commit comments

Comments
 (0)