From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>,
amodra@gmail.com
Subject: Re: [PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]
Date: Tue, 9 Aug 2022 05:35:04 -0500 [thread overview]
Message-ID: <20220809103504.GS25951@gate.crashing.org> (raw)
In-Reply-To: <d21a03d0-dc7e-b4c9-a428-ee0718074876@linux.ibm.com>
Hi!
> + /* As ELFv2 ABI shows, the allowable bytes past the global entry
> + point are 0, 4, 8, 16, 32 and 64. Considering there are two
> + non-prefixed instructions for global entry (8 bytes), the count
> + for patchable NOPs before local entry would be 2, 6 and 14. */
The other option is to allow other numbers of nops, but in that case not
have a local entry point (so, always use the global entry point).
I don't know if that is useful for any users of this support (if there
even are such users :-P )
> + if (patch_area_entry > 0)
> + {
> + if (patch_area_entry != 2
> + && patch_area_entry != 6
> + && patch_area_entry != 14)
> + error ("for %<-fpatchable-function-entry=%u,%u%>, patching "
> + "%u NOP(s) before function entry is invalid, it can "
> + "cause assembler error",
I would not say "it can [etc.]" at all. Oh, and "NOP" (capitals) isn't
a thing, it is not an acronym or such ;-)
> +/* { dg-require-effective-target powerpc_elfv2 } */
> +/* Specify -mcpu=power9 to ensure global entry is needed. */
> +/* { dg-options "-mdejagnu-cpu=power9" } */
Why would it be needed for p9, and not older, or newer?
Every function always has a GEP, so I'm not sure what you are trying to
say here anyway :-)
Rest looks good to me.
Segher
next prev parent reply other threads:[~2022-08-09 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 5:33 Kewen.Lin
2022-08-09 10:35 ` Segher Boessenkool [this message]
2022-08-09 12:51 ` Kewen.Lin
2022-08-09 21:10 ` Segher Boessenkool
2022-08-10 7:42 ` 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=20220809103504.GS25951@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=amodra@gmail.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.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).