This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 3/5] 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: Wed, 14 Jan 2015 17:14:49 -0800
- Subject: [PATCH 3/5] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4
- Authentication-results: sourceware.org; auth=none
- References: <a0366c6b956020e6762b6b78a73b20aba5ec1408 dot 1421282067 dot git dot segher at kernel dot crashing dot org>
- References: <a0366c6b956020e6762b6b78a73b20aba5ec1408 dot 1421282067 dot git dot segher at kernel dot crashing dot org>
This fixes 88 testsuite FAILs.
-mpowerpc64 does not change the ABI, but it does change the value of
UNITS_PER_WORD. This code is for 32-bit only so we can use
MIN_UNITS_PER_WORD instead.
Bootstrapped and tested as usual. Okay for mainline?
Segher
2015-01-14 Segher Boessenkool <segher@kernel.crashing.org>
gcc/
* config/rs6000/rs6000.c (rs6000_va_start): Use MIN_UNITS_PER_WORD
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 ca5ce28..afced72 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -11232,7 +11232,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, words * MIN_UNITS_PER_WORD);
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