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] rs6000: Fix AIX aggregate passing fix
Date: Wed, 05 Dec 2018 00:26:00 -0000 [thread overview]
Message-ID: <452eaa4b26900f05171ab5b782b3ec8bed216785.1543969053.git.segher@kernel.crashing.org> (raw)
David's fix for the AIX aggregate passing from yesterday unfortunately
also triggers on powerpc64-linux. This fixes it.
David, looking at this once more, does this not need a "&& type" test
on AIX? Before the AGGREGATE_TYPE_P test. I suspect it only didn't
crash on AIX because AIX doesn't mind dereferencing address 0?
(But committing this as is now, it fixes bootstrap).
Tested on powerpc64-linux {-m32,-m64}.
Segher
2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
aggregate handling on actual AIX, not on somewhat similar systems.
---
gcc/config/rs6000/rs6000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 4e35a05..ea7ff82 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -11990,7 +11990,7 @@ rs6000_function_arg (cumulative_args_t cum_v, machine_mode mode,
cum->fregno++;
if (USE_FP_FOR_ARG_P (cum, elt_mode)
- && !(TARGET_AIX && AGGREGATE_TYPE_P (type)))
+ && !(TARGET_AIX && !TARGET_ELF && AGGREGATE_TYPE_P (type)))
{
rtx rvec[GP_ARG_NUM_REG + AGGR_ARG_NUM_REG + 1];
rtx r, off;
@@ -12127,7 +12127,7 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v, machine_mode mode,
align_words = rs6000_parm_start (mode, type, cum->words);
if (USE_FP_FOR_ARG_P (cum, elt_mode)
- && !(TARGET_AIX && AGGREGATE_TYPE_P (type)))
+ && !(TARGET_AIX && !TARGET_ELF && AGGREGATE_TYPE_P (type)))
{
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
--
1.8.3.1
next reply other threads:[~2018-12-05 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 0:26 Segher Boessenkool [this message]
2018-12-13 19:27 ` 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=452eaa4b26900f05171ab5b782b3ec8bed216785.1543969053.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).