This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dje dot gcc at gmail dot com, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Fri, 9 Jan 2015 02:52:25 -0800
- Subject: [PATCH] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4
- Authentication-results: sourceware.org; auth=none
This fixes 88 testsuite FAILs.
-mpowerpc64 does not change the ABI, but it does change the value of
UNITS_PER_WORD. We could use POINTER_SIZE_UNITS instead of 4 here,
but that does not seem quite right. This code is for SVR4 only, so
a literal 4 isn't so bad I think. Better suggestions welcome though.
Bootstrapped and tested as usual. Okay for mainline?
Segher
2015-01-09 Segher Boessenkool <segher@kernel.crashing.org>
gcc/
* config/rs6000/rs6000.c (rs6000_va_start): Use a literal 4 instead
of UNITS_PER_WORD to describe the size of stack slots.
---
gcc/config/rs6000/rs6000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 66a1399..cc7b2a4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -11225,7 +11225,7 @@ rs6000_va_start (tree valist, rtx nextarg)
/* Find the overflow area. */
t = make_tree (TREE_TYPE (ovf), virtual_incoming_args_rtx);
if (words != 0)
- t = fold_build_pointer_plus_hwi (t, words * UNITS_PER_WORD);
+ t = fold_build_pointer_plus_hwi (t, 4 * words);
t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
--
1.8.1.4