diff mbox series

PowerPC address support clean, patch 2 of 4

Message ID 20180503172032.GA5549@ibm-toto.the-meissners.org
State New
Headers show
Series PowerPC address support clean, patch 2 of 4 | expand

Commit Message

Michael Meissner May 3, 2018, 5:20 p.m. UTC
These patches were previously posted in March as a RFC, and I would like to
check them into the trunk.  These patches make the mode_supports* functions use
similar names for the functions that return if a mode supports D-FORM, DS-FORM,
and/or DQ-FORM instructions, and add the ability to ask whether a particular
reload register class supports a particular D*-form instruction.

This is patch #2 of 4 and it moves some of the mode support functions to be
next to each other in the source.

I have done a bootstrap with patches 1-4 and did a make check comparison on a
little endian power8 system, and there were no regressions.  Can I check it in?

2018-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (mode_supports_vmx_dform): Move these
	functions to be next to the other mode_supports functions.
	(mode_supports_dq_form): Likewise.

--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

Comments

Segher Boessenkool May 9, 2018, 11:04 p.m. UTC | #1
On Thu, May 03, 2018 at 01:20:32PM -0400, Michael Meissner wrote:
> 2018-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* config/rs6000/rs6000.c (mode_supports_vmx_dform): Move these
> 	functions to be next to the other mode_supports functions.
> 	(mode_supports_dq_form): Likewise.

Okay for trunk, thanks.


Segher
diff mbox series

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 259876)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -553,6 +553,23 @@  mode_supports_pre_modify_p (machine_mode
 	  != 0);
 }
 
+/* Return true if we have D-form addressing in altivec registers.  */
+static inline bool
+mode_supports_vmx_dform (machine_mode mode)
+{
+  return ((reg_addr[mode].addr_mask[RELOAD_REG_VMX] & 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.  */
+static inline bool
+mode_supports_dq_form (machine_mode mode)
+{
+  return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_QUAD_OFFSET)
+	  != 0);
+}
+
 /* Given that there exists at least one variable that is set (produced)
    by OUT_INSN and read (consumed) by IN_INSN, return true iff
    IN_INSN represents one or more memory store operations and none of
@@ -638,23 +655,6 @@  rs6000_store_data_bypass_p (rtx_insn *ou
   return store_data_bypass_p (out_insn, in_insn);
 }
 
-/* Return true if we have D-form addressing in altivec registers.  */
-static inline bool
-mode_supports_vmx_dform (machine_mode mode)
-{
-  return ((reg_addr[mode].addr_mask[RELOAD_REG_VMX] & 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.  */
-static inline bool
-mode_supports_dq_form (machine_mode mode)
-{
-  return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & RELOAD_REG_QUAD_OFFSET)
-	  != 0);
-}
-
 
 /* Processor costs (relative to an add) */