checkstack.pl (3396b3372e61f8b579395e32c53212612b14daff) | checkstack.pl (0df8e97085946dd79c06720678a845778b6d6bf8) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4# Check the stack usage of functions 5# 6# Copyright Joern Engel <joern@lazybastard.org> 7# Inspired by Linus Torvalds 8# Original idea maybe from Keith Owens --- 54 unchanged lines hidden (view full) --- 63 $re = qr/.*sub.*sp, sp, #([0-9]{1,4})/o; 64 $sub = \&arm_push_handling; 65 } elsif ($arch =~ /^x86(_64)?$/ || $arch =~ /^i[3456]86$/) { 66 #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp 67 # or 68 # 2f60: 48 81 ec e8 05 00 00 sub $0x5e8,%rsp 69 $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%(e|r)sp$/o; 70 $dre = qr/^.*[as][du][db] (%.*),\%(e|r)sp$/o; | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4# Check the stack usage of functions 5# 6# Copyright Joern Engel <joern@lazybastard.org> 7# Inspired by Linus Torvalds 8# Original idea maybe from Keith Owens --- 54 unchanged lines hidden (view full) --- 63 $re = qr/.*sub.*sp, sp, #([0-9]{1,4})/o; 64 $sub = \&arm_push_handling; 65 } elsif ($arch =~ /^x86(_64)?$/ || $arch =~ /^i[3456]86$/) { 66 #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp 67 # or 68 # 2f60: 48 81 ec e8 05 00 00 sub $0x5e8,%rsp 69 $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%(e|r)sp$/o; 70 $dre = qr/^.*[as][du][db] (%.*),\%(e|r)sp$/o; |
71 } elsif ($arch eq 'ia64') { 72 #e0000000044011fc: 01 0f fc 8c adds r12=-384,r12 73 $re = qr/.*adds.*r12=-(([0-9]{2}|[3-9])[0-9]{2}),r12/o; | |
74 } elsif ($arch eq 'm68k') { 75 # 2b6c: 4e56 fb70 linkw %fp,#-1168 76 # 1df770: defc ffe4 addaw #-28,%sp 77 $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o; 78 } elsif ($arch eq 'mips64') { 79 #8800402c: 67bdfff0 daddiu sp,sp,-16 80 $re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o; 81 } elsif ($arch eq 'mips') { --- 116 unchanged lines hidden --- | 71 } elsif ($arch eq 'm68k') { 72 # 2b6c: 4e56 fb70 linkw %fp,#-1168 73 # 1df770: defc ffe4 addaw #-28,%sp 74 $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o; 75 } elsif ($arch eq 'mips64') { 76 #8800402c: 67bdfff0 daddiu sp,sp,-16 77 $re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o; 78 } elsif ($arch eq 'mips') { --- 116 unchanged lines hidden --- |