summaryrefslogtreecommitdiff
path: root/scripts/checkstack.pl
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2017-01-03 16:15:03 +0900
committerStafford Horne <shorne@gmail.com>2017-02-06 21:50:50 +0900
commitffcd18f6a4e6c02fa6d094d464fbfc5ada6c48bb (patch)
treed2268e4a71e7ae03f2f27d6d38e249f894ca3e77 /scripts/checkstack.pl
parent97882f734d9b763d7b0323051b233edecbd0a764 (diff)
scripts/checkstack.pl: Add openrisc support
Openrisc stack pointer is managed by decrementing r1. Add regexes to recognize this. Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'scripts/checkstack.pl')
-rwxr-xr-xscripts/checkstack.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index dd8397894d5c..eea5b782a3b7 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -106,6 +106,9 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
} elsif ($arch eq 'sparc' || $arch eq 'sparc64') {
# f0019d10: 9d e3 bf 90 save %sp, -112, %sp
$re = qr/.*save.*%sp, -(([0-9]{2}|[3-9])[0-9]{2}), %sp/o;
+ } elsif ($arch eq 'openrisc') {
+ # c000043c: 9c 21 fe f0 l.addi r1,r1,-272
+ $re = qr/.*l\.addi.*r1,r1,-(([0-9]{2}|[3-9])[0-9]{2})/o;
} else {
print("wrong or unknown architecture \"$arch\"\n");
exit