From 5b470cfcc321c5d50b951fa93a769a4a193ccece Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 28 Feb 2002 03:36:56 +0000 Subject: Patch from David Schleef to check for proper 16-byte aliged stack pointer on powerpc --- test/args/arg_test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/args') diff --git a/test/args/arg_test.c b/test/args/arg_test.c index 09a0fdb66..830bb047c 100644 --- a/test/args/arg_test.c +++ b/test/args/arg_test.c @@ -29,6 +29,16 @@ int main( int argc, char **argv) { int i=0; char** index=__environ; + +#ifdef __powerpc__ + { + unsigned long sp; + sp = (unsigned long) __builtin_frame_address(0); + if(sp&0xf){ + fprintf(stderr, "stack pointer is unaligned! (%08lx)\n", sp); + } + } +#endif fprintf(stderr, "argc=%d\n", argc); -- cgit v1.2.3