public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
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 #1
Date: Thu, 22 Mar 2018 12:13:00 -0000	[thread overview]
Message-ID: <20180322121151.GA20027@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <20180322120346.GA7987@ibm-tiger.the-meissners.org>

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

This patch renames the mode_supports_vsx_dform_quad function and changes all of
the callers.  I'm thinking about enhancing the addressing parts in the
secondary reload support, and I wanted a more logical naming scheme.  There
will be mode_supports_d_form for offsettable addresses of any form, and
mode_supports_ds_form for addresses where the bottom 2 bits are 0 in the
future.

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_dq_form): Rename
	mode_supports_vsx_dform_quad to mode_supports_dq_form.
	(mode_supports_vsx_dform_quad): Likeise.
	(quad_address_p): Likewise.
	(reg_offset_addressing_ok_p): Likewise.
	(offsettable_ok_by_alignment): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(legitimate_lo_sum_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_legitimize_reload_address): Likewise.
	(rs6000_secondary_reload_inner): Likewise.
	(rs6000_preferred_reload_class): Likewise.
	(rs6000_output_move_128bit): 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-patch01b --]
[-- Type: text/plain, Size: 4871 bytes --]

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 258719)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -649,7 +649,7 @@ mode_supports_vmx_dform (machine_mode mo
    is more limited than normal d-form addressing in that the offset must be
    aligned on a 16-byte boundary.  */
 static inline bool
-mode_supports_vsx_dform_quad (machine_mode mode)
+mode_supports_dq_form (machine_mode mode)
 {
   return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_QUAD_OFFSET)
 	  != 0);
@@ -8107,7 +8107,7 @@ quad_address_p (rtx addr, machine_mode m
   if (legitimate_indirect_address_p (addr, strict))
     return true;
 
-  if (VECTOR_MODE_P (mode) && !mode_supports_vsx_dform_quad (mode))
+  if (VECTOR_MODE_P (mode) && !mode_supports_dq_form (mode))
     return false;
 
   if (GET_CODE (addr) != PLUS)
@@ -8289,7 +8289,7 @@ reg_offset_addressing_ok_p (machine_mode
 	 IEEE 128-bit floating point that is passed in a single vector
 	 register.  */
       if (VECTOR_MEM_ALTIVEC_OR_VSX_P (mode))
-	return mode_supports_vsx_dform_quad (mode);
+	return mode_supports_dq_form (mode);
       break;
 
     case E_V2SImode:
@@ -8356,7 +8356,7 @@ offsettable_ok_by_alignment (rtx op, HOS
 
   /* ISA 3.0 vector d-form addressing is restricted, don't allow
      SYMBOL_REF.  */
-  if (mode_supports_vsx_dform_quad (mode))
+  if (mode_supports_dq_form (mode))
     return false;
 
   dsize = GET_MODE_SIZE (mode);
@@ -8527,7 +8527,7 @@ rs6000_legitimate_offset_address_p (mach
     return false;
   if (!INT_REG_OK_FOR_BASE_P (XEXP (x, 0), strict))
     return false;
-  if (mode_supports_vsx_dform_quad (mode))
+  if (mode_supports_dq_form (mode))
     return quad_address_p (x, mode, strict);
   if (!reg_offset_addressing_ok_p (mode))
     return virtual_stack_registers_memory_p (x);
@@ -8645,7 +8645,7 @@ legitimate_lo_sum_address_p (machine_mod
   if (!INT_REG_OK_FOR_BASE_P (XEXP (x, 0), strict))
     return false;
   /* quad word addresses are restricted, and we can't use LO_SUM.  */
-  if (mode_supports_vsx_dform_quad (mode))
+  if (mode_supports_dq_form (mode))
     return false;
   x = XEXP (x, 1);
 
@@ -8710,7 +8710,7 @@ rs6000_legitimize_address (rtx x, rtx ol
   unsigned int extra;
 
   if (!reg_offset_addressing_ok_p (mode)
-      || mode_supports_vsx_dform_quad (mode))
+      || mode_supports_dq_form (mode))
     {
       if (virtual_stack_registers_memory_p (x))
 	return x;
@@ -9454,7 +9454,7 @@ rs6000_legitimize_reload_address (rtx x,
 				  int ind_levels ATTRIBUTE_UNUSED, int *win)
 {
   bool reg_offset_p = reg_offset_addressing_ok_p (mode);
-  bool quad_offset_p = mode_supports_vsx_dform_quad (mode);
+  bool quad_offset_p = mode_supports_dq_form (mode);
 
   /* Nasty hack for vsx_splat_v2df/v2di load from mem, which takes a
      DFmode/DImode MEM.  Ditto for ISA 3.0 vsx_splat_v4sf/v4si.  */
@@ -9742,7 +9742,7 @@ static bool
 rs6000_legitimate_address_p (machine_mode mode, rtx x, bool reg_ok_strict)
 {
   bool reg_offset_p = reg_offset_addressing_ok_p (mode);
-  bool quad_offset_p = mode_supports_vsx_dform_quad (mode);
+  bool quad_offset_p = mode_supports_dq_form (mode);
 
   /* If this is an unaligned stvx/ldvx type address, discard the outer AND.  */
   if (VECTOR_MEM_ALTIVEC_P (mode)
@@ -20409,7 +20409,7 @@ rs6000_secondary_reload_inner (rtx reg, 
 	    }
 	}
 
-      else if (mode_supports_vsx_dform_quad (mode) && CONST_INT_P (op1))
+      else if (mode_supports_dq_form (mode) && CONST_INT_P (op1))
 	{
 	  if (((addr_mask & RELOAD_REG_QUAD_OFFSET) == 0)
 	      || !quad_address_p (addr, mode, false))
@@ -20450,7 +20450,7 @@ rs6000_secondary_reload_inner (rtx reg, 
 	}
 
       /* Quad offsets are restricted and can't handle normal addresses.  */
-      else if (mode_supports_vsx_dform_quad (mode))
+      else if (mode_supports_dq_form (mode))
 	{
 	  emit_insn (gen_rtx_SET (scratch, addr));
 	  new_addr = scratch;
@@ -20645,7 +20645,7 @@ rs6000_preferred_reload_class (rtx x, en
 
       /* D-form addressing can easily reload the value.  */
       if (mode_supports_vmx_dform (mode)
-	  || mode_supports_vsx_dform_quad (mode))
+	  || mode_supports_dq_form (mode))
 	return rclass;
 
       /* If this is a scalar floating point value and we don't have D-form
@@ -21048,7 +21048,7 @@ rs6000_output_move_128bit (rtx operands[
 
       else if (TARGET_VSX && dest_vsx_p)
 	{
-	  if (mode_supports_vsx_dform_quad (mode)
+	  if (mode_supports_dq_form (mode)
 	      && quad_address_p (XEXP (src, 0), mode, true))
 	    return "lxv %x0,%1";
 
@@ -21086,7 +21086,7 @@ rs6000_output_move_128bit (rtx operands[
 
       else if (TARGET_VSX && src_vsx_p)
 	{
-	  if (mode_supports_vsx_dform_quad (mode)
+	  if (mode_supports_dq_form (mode)
 	      && quad_address_p (XEXP (dest, 0), mode, true))
 	    return "stxv %x1,%0";
 

  reply	other threads:[~2018-03-22 12:12 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 ` Michael Meissner [this message]
2018-03-22 14:44   ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #1 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 ` [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #4 Michael Meissner
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=20180322121151.GA20027@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).