This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix va-arg-22 and 931104-12 on powerpc-darwin


The varargs routines were doing the right thing, and the right value
was on the stack, but the wrong value was in register.

This does change the ABI on Darwin!  (It changes it back to what GCC
3.3 used to do.)

Bootstrapped & tested on powerpc-darwin.

===File ~/patches/gcc-darwin-varargpadding.patch============
2004-10-24  Geoffrey Keating  <geoffk@geoffk.org>

	* config/rs6000/darwin.h (BLOCK_REG_PADDING): Define.

Index: config/rs6000/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.65
diff -u -p -r1.65 darwin.h
--- config/rs6000/darwin.h	14 Oct 2004 22:30:42 -0000	1.65
+++ config/rs6000/darwin.h	24 Oct 2004 22:25:43 -0000
@@ -352,6 +352,12 @@ do {									\
    ? MAX (MAX ((COMPUTED), (SPECIFIED)), 128)          			 \
    : MAX ((COMPUTED), (SPECIFIED)))
 
+/* Specify padding for the last element of a block move between
+   registers and memory.  FIRST is nonzero if this is the only
+   element.  */
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+  (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
+
 /* XXX: Darwin supports neither .quad, or .llong, but it also doesn't
    support 64 bit PowerPC either, so this just keeps things happy.  */
 #define DOUBLE_INT_ASM_OP "\t.quad\t"
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]