Re: make checkstack on m68k

From: Geert Uytterhoeven
Date: Thu Jun 17 2004 - 14:38:13 EST


On Thu, 17 Jun 2004, Geert Uytterhoeven wrote:
> On Thu, 17 Jun 2004, [iso-8859-1] Jörn Engel wrote:
> > On Fri, 18 June 2004 01:17:31 +1000, Finn Thain wrote:
> > > On Thu, 17 Jun 2004, Andreas Schwab wrote:
> > > >
> > > > $re = qr/.*(?:linkw %fp,|addw )#-([0-9]{1,4})(?:,%sp)?$/o;
> > >
> > > I think that should be addaw, not addw. And it may be necessary to remove
> > > the $ anchor at the end.
> >
> > Changed, updated patch below. Thanks.
> >
> > Can anyone test?
>
> Doesn't work ;-(
>
> I also tried with
>
> $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o;
>
> but still didn't work ;-(

*bummer*

why doesn't checkstack.pl complain if I forget to specify `m68k'?!?

So it works with the above regex, if I undo the `my $size = $2;' change as
well.

To avoid mistakes/confusion, here is a patch against pristine 2.6.7:

--- linux-2.6.7/scripts/checkstack.pl 2004-06-09 14:51:23.000000000 +0200
+++ linux-m68k-2.6.7/checkstack.pl 2004-06-17 21:31:45.000000000 +0200
@@ -40,6 +40,10 @@
} elsif ($arch =~ /^ia64$/) {
#e0000000044011fc: 01 0f fc 8c adds r12=-384,r12
$re = qr/.*adds.*r12=-(([0-9]{2}|[3-9])[0-9]{2}),r12/o;
+ } elsif ($arch =~ /^m68k$/) {
+ # 2b6c: 4e56 fb70 linkw %fp,#-1168
+ # 1df770: defc ffe4 addaw #-28,%sp
+ $re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o;
} elsif ($arch =~ /^mips64$/) {
#8800402c: 67bdfff0 daddiu sp,sp,-16
$re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o;


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/