2019-01-17 22:02:13

by Bernhard Reutner-Fischer

[permalink] [raw]
Subject: [PATCH 1/2] checkstack.pl: Add blackfin support

We've been carrying this since some time now.. Original submission:
http://lists.busybox.net/pipermail/busybox/2007-August/028420.html

Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
---
scripts/checkstack.pl | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..8946fc99ad83 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -13,6 +13,7 @@
# sh64 port by Paul Mundt
# Random bits by Matt Mackall <[email protected]>
# M68k port by Geert Uytterhoeven and Andreas Schwab
+# blackfin port by Alex Landau
# AArch64, PARISC ports by Kyle McMartin
# sparc port by Martin Habets <[email protected]>
# ppc64le port by Breno Leitao <[email protected]>
@@ -54,6 +55,9 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
} elsif ($arch eq 'arm') {
#c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
+ } elsif ($arch eq 'blackfin') {
+ # 52: 00 e8 03 00 LINK 0xc;
+ $re = qr/.*LINK (0x$x{1,5});$/o;
} elsif ($arch =~ /^x86(_64)?$/ || $arch =~ /^i[3456]86$/) {
#c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp
# or
--
2.20.1



2019-01-17 23:58:24

by Bernhard Reutner-Fischer

[permalink] [raw]
Subject: [PATCH 2/2] checkstack.pl: Commentary typo fix

s/redution/reduction/

Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
---
scripts/checkstack.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 8946fc99ad83..82ea54ac159c 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -31,7 +31,7 @@ use strict;
# $& (whole re) matches the complete objdump line with the stack growth
# $1 (first bracket) matches the size of the stack growth
#
-# $dre is similar, but for dynamic stack redutions:
+# $dre is similar, but for dynamic stack reductions:
# $& (whole re) matches the complete objdump line with the stack growth
# $1 (first bracket) matches the dynamic amount of the stack growth
#
--
2.20.1


2019-01-18 07:57:10

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/2] checkstack.pl: Add blackfin support

Hi Bernhard,

Thanks for your patch!

On Thu, Jan 17, 2019 at 11:01 PM Bernhard Reutner-Fischer
<[email protected]> wrote:
> We've been carrying this since some time now.. Original submission:
> http://lists.busybox.net/pipermail/busybox/2007-August/028420.html
>
> Signed-off-by: Bernhard Reutner-Fischer <[email protected]>

A similar patch was merged in commit 1e9535a591cf003e ("Add stack
checking for Blackfin").

In the mean time, blackfin support was removed from Linux in commit
4ba66a9760722ccb ("arch: remove blackfin port"), and from checkstack in
commit e53a05a49e10c7cf ("scripts/checkstack.pl: remove blackfin support").

Nevertheless, I can imagine it's nice to have it, as I have used
checkstack for non-Linux projects, too ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2019-01-18 08:57:54

by Bernhard Reutner-Fischer

[permalink] [raw]
Subject: Re: [PATCH 1/2] checkstack.pl: Add blackfin support

On Fri, 18 Jan 2019 08:54:15 +0100
Geert Uytterhoeven <[email protected]> wrote:

> A similar patch was merged in commit 1e9535a591cf003e ("Add stack
> checking for Blackfin").
>
> In the mean time, blackfin support was removed from Linux in commit
> 4ba66a9760722ccb ("arch: remove blackfin port"), and from checkstack in
> commit e53a05a49e10c7cf ("scripts/checkstack.pl: remove blackfin support").
>
> Nevertheless, I can imagine it's nice to have it, as I have used
> checkstack for non-Linux projects, too ;-)

Yea, so i'm retracting the patch, maybe you can revert e53a05a instead.
Please consider taking the 2/2 typo fix though.

thanks,