This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PowerPC/23070] CALL_V4_CLEAR_FP_ARGS flag not properly set
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 20 Aug 2005 09:45:37 +0930
- Subject: [PowerPC/23070] CALL_V4_CLEAR_FP_ARGS flag not properly set
The changelog says it all. Bootstrapped and reg tested powerpc-linux.
This isn't a regression since abi_v4 has this bug as far back as I
could find, but I'd like to apply this to the 4.0 and 3.4 branches too.
I think it ought to qualify as an obvious bugfix. OK to apply?
:ADDPATCH target(powerpc):
PR target/23070
* config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to
stdarg functions, set/clear the fp marker even when no variable
args are passed.
* config/rs6000/sysv4.opt (mprototype): Describe.
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.860
diff -u -p -r1.860 rs6000.c
--- gcc/config/rs6000/rs6000.c 11 Aug 2005 21:18:11 -0000 1.860
+++ gcc/config/rs6000/rs6000.c 19 Aug 2005 13:52:42 -0000
@@ -4997,9 +4997,10 @@ function_arg (CUMULATIVE_ARGS *cum, enum
if (mode == VOIDmode)
{
if (abi == ABI_V4
- && cum->nargs_prototype < 0
&& (cum->call_cookie & CALL_LIBCALL) == 0
- && (cum->prototype || TARGET_NO_PROTOTYPE))
+ && (cum->stdarg
+ || (cum->nargs_prototype < 0
+ && (cum->prototype || TARGET_NO_PROTOTYPE))))
{
/* For the SPE, we need to crxor CR6 always. */
if (TARGET_SPE_ABI)
Index: gcc/config/rs6000/sysv4.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.opt,v
retrieving revision 1.5
diff -u -p -r1.5 sysv4.opt
--- gcc/config/rs6000/sysv4.opt 25 Jun 2005 01:22:18 -0000 1.5
+++ gcc/config/rs6000/sysv4.opt 19 Aug 2005 14:00:35 -0000
@@ -76,7 +76,7 @@ no description yet
mprototype
Target Mask(PROTOTYPE)
-no description yet
+Assume all variable arg functions are prototyped
;; FIXME: Does nothing.
mno-traceback
--
Alan Modra
IBM OzLabs - Linux Technology Centre