From afc1c5fa0dd3c261e5e234024e0665aadc29c9ff Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 11 May 2015 16:33:28 -0700 Subject: [PATCH] i386: Add CCPmode For testing parity coming out of asm flags. From-SVN: r223026 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386-modes.def | 2 ++ gcc/config/i386/i386.c | 19 +++++++++++-------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4690b78399..f7d9856ab05 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-11 Richard Henderson + + * config/i386/i386-modes.def (CCP): New. + * config/i386/i386.c (put_condition_code): Handle it. + (ix86_match_ccmode, ix86_cc_modes_compatible): Likewise. + 2015-05-11 Richard Henderson * target.def (md_asm_clobbers): Replace with... diff --git a/gcc/config/i386/i386-modes.def b/gcc/config/i386/i386-modes.def index 0b6a1f157f6..714c138cc6a 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 70becc0e737..1f130971204 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14997,21 +14997,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: @@ -15020,21 +15020,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: @@ -19765,6 +19765,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; @@ -19913,6 +19914,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) @@ -19927,6 +19929,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; -- 2.30.2