From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #4
Date: Thu, 22 Mar 2018 12:43:00 -0000 [thread overview]
Message-ID: <20180322121919.GD20027@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <20180322120346.GA7987@ibm-tiger.the-meissners.org>
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
This patch extends the other mode_supports* function to take an optional
second argument to specificy particular reload register class, and it defaults
to REG_RELOAD_ANY which says some reload register supports the feature.
I have built bootstrap compilers with the first 4 patches including this patch
on both big and little endian power8 systems. There were no regressions.
2018-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (mode_supports_pre_incdec_p): Add
additional argument to specify the reload register class to use,
defaulting to RELOAD_REG_ANY.
(mode_supports_pre_modify_p): Likewise.
(mode_supports_dq_form): Likewise.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
[-- Attachment #2: ext-addr.rev2-patch04b --]
[-- Type: text/plain, Size: 2456 bytes --]
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 258726)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -537,20 +537,22 @@ struct rs6000_reg_addr {
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
-/* Helper function to say whether a mode supports PRE_INC or PRE_DEC. */
+/* Helper function to say whether a mode supports PRE_INC or PRE_DEC in a given
+ reload register class or if some reload register class supports it. */
static inline bool
-mode_supports_pre_incdec_p (machine_mode mode)
+mode_supports_pre_incdec_p (machine_mode mode,
+ enum rs6000_reload_reg_type rt = RELOAD_REG_ANY)
{
- return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_PRE_INCDEC)
- != 0);
+ return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_PRE_INCDEC) != 0);
}
-/* Helper function to say whether a mode supports PRE_MODIFY. */
+/* Helper function to say whether a mode supports PRE_MODIFY in a given
+ reload register class or if some reload register class supports it.. */
static inline bool
-mode_supports_pre_modify_p (machine_mode mode)
+mode_supports_pre_modify_p (machine_mode mode,
+ enum rs6000_reload_reg_type rt = RELOAD_REG_ANY)
{
- return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_PRE_MODIFY)
- != 0);
+ return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_PRE_MODIFY) != 0);
}
/* Return true if we have D-form addressing (register+offset) in either a
@@ -563,14 +565,14 @@ mode_supports_d_form (machine_mode mode,
return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_OFFSET) != 0);
}
-/* Return true if we have D-form addressing in VSX registers. This addressing
- is more limited than normal d-form addressing in that the offset must be
- aligned on a 16-byte boundary. */
+/* Return true if we have DQ-form addressing in a given reload register class
+ or if some reload register class supports it. DQ-form addressing must have
+ the bottom 4 bits set to 0. */
static inline bool
-mode_supports_dq_form (machine_mode mode)
+mode_supports_dq_form (machine_mode mode,
+ enum rs6000_reload_reg_type rt = RELOAD_REG_ANY)
{
- return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_QUAD_OFFSET)
- != 0);
+ return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_QUAD_OFFSET) != 0);
}
/* Given that there exists at least one variable that is set (produced)
next prev parent reply other threads:[~2018-03-22 12:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 12:12 [RFC Patch], PowerPC memory support pre-gcc9, Version 2 Michael Meissner
2018-03-22 12:13 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #1 Michael Meissner
2018-03-22 14:44 ` Segher Boessenkool
2018-03-22 12:14 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #2 Michael Meissner
2018-03-22 12:19 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #3 Michael Meissner
2018-03-22 15:11 ` Segher Boessenkool
2018-03-22 15:32 ` Michael Meissner
2018-03-22 16:52 ` Segher Boessenkool
2018-03-22 17:24 ` Michael Meissner
2018-03-22 12:43 ` Michael Meissner [this message]
2018-03-22 15:33 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #6 Michael Meissner
2018-03-22 15:33 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #5 Michael Meissner
2018-03-22 15:34 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #7 Michael Meissner
2018-03-22 15:35 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #8 Michael Meissner
2018-03-22 15:44 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #9 Michael Meissner
2018-03-22 17:39 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #10 Michael Meissner
2018-03-23 14:52 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #11 Michael Meissner
2018-03-27 22:02 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #12 Michael Meissner
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=20180322121919.GD20027@ibm-tiger.the-meissners.org \
--to=meissner@linux.vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.vnet.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).