diff mbox

[5/6] i386: Add CCPmode

Message ID 1431034740-5375-6-git-send-email-rth@redhat.com
State New
Headers show

Commit Message

Richard Henderson May 7, 2015, 9:38 p.m. UTC
For testing parity coming out of asm flags.
---
 gcc/config/i386/i386-modes.def |  2 ++
 gcc/config/i386/i386.c         | 19 +++++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)

Comments

Jeff Law May 8, 2015, 6:16 p.m. UTC | #1
On 05/07/2015 03:38 PM, Richard Henderson wrote:
> For testing parity coming out of asm flags.
> ---
>   gcc/config/i386/i386-modes.def |  2 ++
>   gcc/config/i386/i386.c         | 19 +++++++++++--------
>   2 files changed, 13 insertions(+), 8 deletions(-)
Seems like it ought to move forward now.

Oh yea, I guess you should consider my prior messages as reviews with 
the following note.

Need ChangeLog entry and testing.  With those good for the trunk.

jeff
diff mbox

Patch

diff --git a/gcc/config/i386/i386-modes.def b/gcc/config/i386/i386-modes.def
index 0b6a1f1..714c138 100644
--- a/gcc/config/i386/i386-modes.def
+++ b/gcc/config/i386/i386-modes.def
@@ -55,6 +55,7 @@  ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4);
    Add CCA to indicate that only the Above flag is valid.
    Add CCC to indicate that only the Carry flag is valid.
    Add CCO to indicate that only the Overflow flag is valid.
+   Add CCP to indicate that only the Parity flag is valid.
    Add CCS to indicate that only the Sign flag is valid.
    Add CCZ to indicate that only the Zero flag is valid.  */
 
@@ -64,6 +65,7 @@  CC_MODE (CCNO);
 CC_MODE (CCA);
 CC_MODE (CCC);
 CC_MODE (CCO);
+CC_MODE (CCP);
 CC_MODE (CCS);
 CC_MODE (CCZ);
 CC_MODE (CCFP);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c47134e..7cbb465 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15001,21 +15001,21 @@  put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
 	case CCAmode:
 	  suffix = "a";
 	  break;
-
 	case CCCmode:
 	  suffix = "c";
 	  break;
-
 	case CCOmode:
 	  suffix = "o";
 	  break;
-
+	case CCPmode:
+	  suffix = "p";
+	  break;
 	case CCSmode:
 	  suffix = "s";
 	  break;
-
 	default:
 	  suffix = "e";
+	  break;
 	}
       break;
     case NE:
@@ -15024,21 +15024,21 @@  put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
 	case CCAmode:
 	  suffix = "na";
 	  break;
-
 	case CCCmode:
 	  suffix = "nc";
 	  break;
-
 	case CCOmode:
 	  suffix = "no";
 	  break;
-
+	case CCPmode:
+	  suffix = "np";
+	  break;
 	case CCSmode:
 	  suffix = "ns";
 	  break;
-
 	default:
 	  suffix = "ne";
+	  break;
 	}
       break;
     case GT:
@@ -19769,6 +19769,7 @@  ix86_match_ccmode (rtx insn, machine_mode req_mode)
     case CCAmode:
     case CCCmode:
     case CCOmode:
+    case CCPmode:
     case CCSmode:
       if (set_mode != req_mode)
 	return false;
@@ -19917,6 +19918,7 @@  ix86_cc_modes_compatible (machine_mode m1, machine_mode m2)
     case CCAmode:
     case CCCmode:
     case CCOmode:
+    case CCPmode:
     case CCSmode:
     case CCZmode:
       switch (m2)
@@ -19931,6 +19933,7 @@  ix86_cc_modes_compatible (machine_mode m1, machine_mode m2)
 	case CCAmode:
 	case CCCmode:
 	case CCOmode:
+	case CCPmode:
 	case CCSmode:
 	case CCZmode:
 	  return CCmode;