From: James Norris <jnorris@codesourcery.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Add -foffload-abi support for PPC
Date: Fri, 09 Oct 2015 12:20:00 -0000 [thread overview]
Message-ID: <5617B121.7000500@codesourcery.com> (raw)
In-Reply-To: <CAGWvnym-fXuBcmqtyyvzdDqOTNnm=kxFNPxYSWitYo4f1uWtvA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
David,
On 10/08/2015 11:53 AM, David Edelsohn wrote:
> On Thu, Oct 8, 2015 at 12:19 PM, James Norris <jnorris@codesourcery.com> wrote:
>
>> I've revised the patch from the review comments (thank you) and
>> is attached.
>>
>> Regtested on x86_64 and powerpcle64.
>>
>> OK for trunk?
>
> What is the goal? Do you want this to return the correct value or only
> the value for the supported 64 bit PPC64LE system?
>
> Thanks, David
>
>
The goal is to support both 32-bit and 64-bit. There was some
confusion on my part, my apologies.
Attached is the corrected patch.
Thanks!
Jim
[-- Attachment #2: ppc.patch --]
[-- Type: text/x-patch, Size: 924 bytes --]
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index e095f03..8aac4f7 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1690,6 +1690,9 @@ static const struct attribute_spec rs6000_attribute_table[] =
#define TARGET_LIBGCC_SHIFT_COUNT_MODE rs6000_abi_word_mode
#undef TARGET_UNWIND_WORD_MODE
#define TARGET_UNWIND_WORD_MODE rs6000_abi_word_mode
+
+#undef TARGET_OFFLOAD_OPTIONS
+#define TARGET_OFFLOAD_OPTIONS rs6000_offload_options
\f
/* Processor table. */
@@ -9530,6 +9533,16 @@ rs6000_abi_word_mode (void)
return TARGET_32BIT ? SImode : DImode;
}
+/* Implement the TARGET_OFFLOAD_OPTIONS hook. */
+static char *
+rs6000_offload_options (void)
+{
+ if (TARGET_64BIT)
+ return xstrdup ("-foffload-abi=lp64");
+ else
+ return xstrdup ("-foffload-abi=ilp32");
+}
+
/* On rs6000, function arguments are promoted, as are function return
values. */
next prev parent reply other threads:[~2015-10-09 12:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87zizxcxnm.fsf@schwinge.name>
2015-10-06 16:38 ` [gomp4] " James Norris
2015-10-07 8:02 ` Thomas Schwinge
2015-10-07 13:51 ` David Edelsohn
2015-10-08 16:19 ` James Norris
2015-10-08 16:53 ` David Edelsohn
2015-10-09 12:20 ` James Norris [this message]
2015-10-09 12:22 ` David Edelsohn
2015-10-08 16:55 ` Thomas Schwinge
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=5617B121.7000500@codesourcery.com \
--to=jnorris@codesourcery.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=thomas@codesourcery.com \
/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).