From: Segher Boessenkool <segher@kernel.crashing.org>
To: HAO CHEN GUI <guihaoc@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, wschmidt@linux.ibm.com
Subject: Re: [PATCH, rs6000] Add non-relative jump table support on Power Linux
Date: Mon, 28 Sep 2020 17:46:42 -0500 [thread overview]
Message-ID: <20200928224642.GR28786@gate.crashing.org> (raw)
In-Reply-To: <3c2e3bb1-f34a-60ad-5c8b-e2eb83c2d532@linux.ibm.com>
Hi hao Chen,
On Wed, Sep 09, 2020 at 04:55:29PM +0800, HAO CHEN GUI wrote:
> Thanks for your advice. I removed macros defined in linux64.h and
> linux.h. So they take relative jump tables by default. When
> no-relative-jumptables is set, the absolute jump tables are taken. All
> things relevant to section relocations are put in another patch. Thanks
> again.
[ Please do not insert patches into discussions ]
> +/* Implement TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC.
> + Return true if rs6000_relative_jumptables is set. */
Don't just say what the code does (we can see that ;-) ); say *why*.
Of course it is terribly simple in this case, so maybe just that first
line is plenty.
> +/* Specify the machine mode that this machine uses
> + for the index in the tablejump instruction. */
> +#define CASE_VECTOR_MODE \
> + (TARGET_32BIT || rs6000_relative_jumptables ? SImode : Pmode)
If TARGET_32BIT is true, SImode and Pmode are the same, so this is
simpler said as
#define CASE_VECTOR_MODE (rs6000_relative_jumptables ? SImode : Pmode)
I'll have the tablejump* patterns converted to paremeterized names
hopefully tonight or tomorrow, which will make your patch much easier
to read. It looks like it will be fine, thanks :-)
Segher
next prev parent reply other threads:[~2020-09-28 22:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 7:31 HAO CHEN GUI
2020-08-20 0:14 ` Segher Boessenkool
2020-08-24 7:48 ` HAO CHEN GUI
2020-09-07 21:46 ` Segher Boessenkool
2020-09-09 8:55 ` HAO CHEN GUI
2020-09-28 0:37 ` HAO CHEN GUI
2020-09-28 22:46 ` Segher Boessenkool [this message]
2020-10-15 8:46 ` HAO CHEN GUI
2020-11-06 1:02 ` HAO CHEN GUI
2020-11-16 6:56 ` HAO CHEN GUI
2020-11-23 2:41 ` HAO CHEN GUI
2020-11-23 22:25 ` Segher Boessenkool
2020-11-27 1:16 ` HAO CHEN GUI
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=20200928224642.GR28786@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=guihaoc@linux.ibm.com \
--cc=wschmidt@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).