This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix STACK_BOUNDARY on sparcv9
- From: Geoff Keating <geoffk at geoffk dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rth at redhat dot com, davem at redhat dot com, jakub at redhat dot com
- Date: Mon, 6 Oct 2003 16:19:26 -0700
- Subject: Fix STACK_BOUNDARY on sparcv9
This patch corrects STACK_BOUNDARY on sparcv9. It's an attempt to not
break the sparc port when I commit the patch discussed in
<http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01757.html>
Unfortunately, it's completely untested (well, technically it has
passed a bootstrap on powerpc-darwin, but that doesn't say much) since
I don't have a 64-bit sparc. I'll wait a few days to give the sparc
maintainers a chance to test it...
Richard said it was correct in
<http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01807.html>
but it might have some unexpected consequences.
--
- Geoffrey Keating <geoffk@geoffk.org>
===File ~/patches/gcc-sparcv9stackboundary.patch============
2003-10-06 Geoffrey Keating <geoffk@apple.com>
* config/sparc/sparc.h (STACK_BOUNDARY): Update to be correct
when
TARGET_ARCH64 && TARGET_STACK_BIAS.
Index: config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.234
diff -u -p -u -p -r1.234 sparc.h
--- config/sparc/sparc.h 2 Oct 2003 00:44:28 -0000 1.234
+++ config/sparc/sparc.h 6 Oct 2003 22:59:52 -0000
@@ -780,7 +780,7 @@ if (TARGET_ARCH64 \
#define PARM_BOUNDARY (TARGET_ARCH64 ? 64 : 32)
/* Boundary (in *bits*) on which stack pointer should be aligned. */
-#define STACK_BOUNDARY (TARGET_ARCH64 ? 128 : 64)
+#define STACK_BOUNDARY (TARGET_ARCH64 ? (TARGET_STACK_BIAS ? 8 : 128)
: 64)
/* ALIGN FRAMES on double word boundaries */
============================================================