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 v2] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]
Date: Fri, 12 Aug 2022 12:28:09 -0500 [thread overview]
Message-ID: <20220812172809.GI25951@gate.crashing.org> (raw)
In-Reply-To: <878358db-5d17-043c-cf09-b34ff9f4449a@linux.ibm.com>
Hi!
On Fri, Aug 12, 2022 at 05:40:06PM +0800, Kewen.Lin wrote:
> This patch is to update the NOPs patched before and after
> local entry, it looks like:
As I said before, please don't say NOPs. I know some documentation
does. That docvumentation needs fixing. This is not an acronym or
similar: "nop" is short for "noop" or "no-op", meaning "no operation".
It also is a well-accepted term. It also is an assembler mnemonic, and
has to be written as all lower case there as well.
Just say "nops" please.
> --- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
> +++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
> @@ -1,6 +1,7 @@
> /* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
> /* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
> /* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
> +/* { dg-additional-options "-fpatchable-function-entry=3,2" { target powerpc_elfv2 } } */
Add a comment why this is needed? People looking at this testcase in
the future (including yourself!) will thank you.
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr99888-1.c
> @@ -0,0 +1,45 @@
> +/* { dg-require-effective-target powerpc_elfv2 } */
Does this not work on other PowerPC targets?
> +/* Verify no errors for different NOPs after local entry. */
(Add "on ELFv2" if you make the test run everywhere :-) )
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr99888-2.c
> @@ -0,0 +1,45 @@
> +/* { dg-require-effective-target powerpc_elfv2 } */
> +
> +/* Verify no errors for 2, 6 and 14 NOPs before local entry. */
Similar.
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr99888-3.c
> @@ -0,0 +1,12 @@
> +/* { dg-require-effective-target powerpc_elfv2 } */
> +/* { dg-options "-fpatchable-function-entry=1" } */
> +
> +/* Verify no errors, using command line option instead of function
> + attribute. */
> +
> +extern int a;
> +
> +int test (int b) {
> + return a + b;
> +}
And more.
Rest looks good, thanks!
Segher
prev parent reply other threads:[~2022-08-12 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 9:40 Kewen.Lin
2022-08-12 17:28 ` Segher Boessenkool [this message]
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=20220812172809.GI25951@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).