summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-02-28 03:36:56 +0000
committerEric Andersen <andersen@codepoet.org>2002-02-28 03:36:56 +0000
commit5b470cfcc321c5d50b951fa93a769a4a193ccece (patch)
treed5087fe8c9024421db28906cd988e67696d0b5c3 /test
parent606def5ccdb22475cc671fb3f0c7dddfab350bb3 (diff)
Patch from David Schleef to check for proper 16-byte aliged
stack pointer on powerpc
Diffstat (limited to 'test')
-rw-r--r--test/args/arg_test.c10
1 files changed, 10 insertions, 0 deletions
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);