History

checkstack.pl: fix for aarch64

There is actually a space after "sp," like this, ffff2000080813c8: a9bb7bfd 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.

Qian Cai committed 7 years ago

Commit f1733a11 parent 01e881f1 file · +2 −2Browse files

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

Unified · Split

scripts/checkstack.pl+2−2
@@ -47,8 +47,8 @@ my (@stack, $re, $dre, $x, $xs, $funcre); · 46 unmodified lines
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;