public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: gcc-patches@gcc.gnu.org
Cc: dje.gcc@gmail.com, Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH 3/5] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4
Date: Thu, 15 Jan 2015 01:47:00 -0000	[thread overview]
Message-ID: <1d688a8612dad6cb75591308bb4662bb10a3c8c6.1421282067.git.segher@kernel.crashing.org> (raw)
In-Reply-To: <a0366c6b956020e6762b6b78a73b20aba5ec1408.1421282067.git.segher@kernel.crashing.org>
In-Reply-To: <a0366c6b956020e6762b6b78a73b20aba5ec1408.1421282067.git.segher@kernel.crashing.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

  reply	other threads:[~2015-01-15  1:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15  1:19 [PATCH 1/5] rs6000: Fix PROMOTE_MODE for -m32 -mpowerpc64 Segher Boessenkool
2015-01-15  1:47 ` Segher Boessenkool [this message]
2015-01-15  4:53   ` [PATCH 3/5] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4 David Edelsohn
2015-01-15  3:51 ` [PATCH 2/5] rs6000: Fix TARGET_PROMOTE_FUNCTION_MODE Segher Boessenkool
2015-01-15  4:43   ` David Edelsohn
2015-01-15  4:36 ` [PATCH 4/5] rs6000: Introducing rs6000_abi_word_mode Segher Boessenkool
2015-01-15  5:00   ` David Edelsohn
2015-01-15  4:37 ` [PATCH 5/5] rs6000: Do not allow TImode with -m32 -mpowerpc64 Segher Boessenkool
2015-01-15 16:18   ` David Edelsohn
2015-01-16 16:58     ` Segher Boessenkool
2015-01-15  4:39 ` [PATCH 1/5] rs6000: Fix PROMOTE_MODE for " David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d688a8612dad6cb75591308bb4662bb10a3c8c6.1421282067.git.segher@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).