[2/3] PowerPC future: Rename some p9 hardware functions.

Message ID 1591041713-24527-3-git-send-email-meissner@linux.ibm.com
State New
Headers show
Series
  • [1/3] PowerPC future: Add byte swap insns
Related show

Commit Message

Kees Cook via Gcc-patches June 1, 2020, 8:01 p.m.
This patch renames some functions that were added for power9 support that are
named '_p9' to be '_hw'.  This is preparation for the next patch that wants to
extend these functions for -mcpu=power support.

2020-06-01  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/rs6000.c (rs6000_emit_hw_fp_minmax): Rename
	rs6000_emit_p9_fp_minmax.
	(rs6000_emit_hw_fp_cmove): Rename rs6000_emit_p9_fp_cmove.
	(rs6000_emit_cmove): Update calls to rs6000_emit_hw_fp_minmax and
	rs6000_emit_hw_fp_cmove.
---
 gcc/config/rs6000/rs6000.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
1.8.3.1

Comments

Segher Boessenkool June 9, 2020, 9:22 p.m. | #1
Hi!

On Mon, Jun 01, 2020 at 04:01:52PM -0400, Michael Meissner wrote:
> This patch renames some functions that were added for power9 support that are

> named '_p9' to be '_hw'.  This is preparation for the next patch that wants to

> extend these functions for -mcpu=power support.


_hw means nothing.  Please come up with a more useful name?

> 

> 2020-06-01  Michael Meissner  <meissner@linux.ibm.com>

> 

> 	* config/rs6000/rs6000.c (rs6000_emit_hw_fp_minmax): Rename

> 	rs6000_emit_p9_fp_minmax.


	(rs6000_emit_p9_fp_minmax): Rename to...
	(rs6000_emit_hw_fp_minmax): ... this.

> 	(rs6000_emit_hw_fp_cmove): Rename rs6000_emit_p9_fp_cmove.

> 	(rs6000_emit_cmove): Update calls to rs6000_emit_hw_fp_minmax and

> 	rs6000_emit_hw_fp_cmove.


Just "Adjust." is fine :-)


Segher

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 8435bc1..0921328 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14850,7 +14850,7 @@  rs6000_emit_vector_cond_expr (rtx dest, rtx op_true, rtx op_false,
    hardware has no such operation.  */
 
 static int
-rs6000_emit_p9_fp_minmax (rtx dest, rtx op, rtx true_cond, rtx false_cond)
+rs6000_emit_hw_fp_minmax (rtx dest, rtx op, rtx true_cond, rtx false_cond)
 {
   enum rtx_code code = GET_CODE (op);
   rtx op0 = XEXP (op, 0);
@@ -14892,7 +14892,7 @@  rs6000_emit_p9_fp_minmax (rtx dest, rtx op, rtx true_cond, rtx false_cond)
    zero/false.  Return 0 if the hardware has no such operation.  */
 
 static int
-rs6000_emit_p9_fp_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
+rs6000_emit_hw_fp_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
 {
   enum rtx_code code = GET_CODE (op);
   rtx op0 = XEXP (op, 0);
@@ -14974,10 +14974,10 @@  rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
       && (compare_mode == SFmode || compare_mode == DFmode)
       && (result_mode == SFmode || result_mode == DFmode))
     {
-      if (rs6000_emit_p9_fp_minmax (dest, op, true_cond, false_cond))
+      if (rs6000_emit_hw_fp_minmax (dest, op, true_cond, false_cond))
 	return 1;
 
-      if (rs6000_emit_p9_fp_cmove (dest, op, true_cond, false_cond))
+      if (rs6000_emit_hw_fp_cmove (dest, op, true_cond, false_cond))
 	return 1;
     }