From: Peter Bergner <bergner@linux.ibm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000: Compute rop_hash_save_offset for non-Altivec compiles [PR115389]
Date: Thu, 13 Jun 2024 22:26:00 -0500 [thread overview]
Message-ID: <544eb6de-906d-4c25-8dbb-422c5bf6fef2@linux.ibm.com> (raw)
In-Reply-To: <ec909a33-65d1-96c1-888b-2d158151a9bf@linux.ibm.com>
On 6/13/24 9:26 PM, Kewen.Lin wrote:
> on 2024/6/13 21:24, Peter Bergner wrote:
>> On 6/13/24 12:35 AM, Kewen.Lin wrote:
>>>> @@ -826,7 +826,14 @@ rs6000_stack_info (void)
>>>> info->ehrd_offset -= info->rop_hash_size;
>>>> }
>>>> else
>>>> - info->ehrd_offset = info->gp_save_offset - ehrd_size;
>>>> + {
>>>> + info->ehrd_offset = info->gp_save_offset - ehrd_size;
>>>> +
>>>> + /* Adjust for ROP protection. */
>>>> + info->rop_hash_save_offset
>>>> + = info->gp_save_offset - info->rop_hash_size;
>>>> + info->ehrd_offset -= info->rop_hash_size;
>>>> + }
>>>
>>> I understand this is just copied from the if arm, but if I read this right, it can be
>>> simplified as:
>>
>> Ok, I'll retest with that simplification.
So I retested a normal powerpc64le-linux build (ie, we default to Power8
with Altivec) and it bootstrapped and regtested with no regressions.
I then attempted a --with-cpu=power5 build to test the non-altivec path,
but both the unpatched and patched builds died building libgfortran with
the following error: "error: ‘_Float128’ is not supported on this target".
I believe that is related to PR113652. I'll kick off the build again,
this time disabling Fortran and seeing if the build completes.
>>>> +/* { dg-do assemble } */
>>>> +/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect -mno-vsx -mno-altivec -mabi=no-altivec -save-temps" } */
>>>
>>> I'd expect -mabi=no-altivec is default for -mno-altivec, but specifying it explicitly
>>> looks fine to me. :)
>>
>> That's what I expected too! :-) However, I was surprised to learn that -mno-altivec
>> does *not* disable TARGET_ALTIVEC_ABI. I had to explicitly use the -mabi= option to
>> expose the bug.
>
> oh, it's surprising, I learn something today! :) I guess it's not intentional but just no
> one noticed it, as it seems nonsense to have altivec ABI extension but not using any altivec
> features.
Agreed!
Peter
next prev parent reply other threads:[~2024-06-14 3:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 4:06 Peter Bergner
2024-06-13 2:14 ` [PING][PATCH] " Peter Bergner
2024-06-13 5:35 ` [PATCH] " Kewen.Lin
2024-06-13 13:24 ` Peter Bergner
2024-06-14 2:26 ` Kewen.Lin
2024-06-14 3:26 ` Peter Bergner [this message]
2024-06-14 17:05 ` Peter Bergner
2024-06-17 2:10 ` Kewen.Lin
2024-06-17 2:31 ` Peter Bergner
2024-06-17 2:40 ` Kewen.Lin
2024-06-17 12:57 ` Peter Bergner
2024-06-18 2:55 ` Kewen.Lin
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=544eb6de-906d-4c25-8dbb-422c5bf6fef2@linux.ibm.com \
--to=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.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).