pa.md (movccfp): New expander.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sun, 20 Apr 2003 17:18:03 +0000 (17:18 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 20 Apr 2003 17:18:03 +0000 (17:18 +0000)
PR/8705
* pa.md (movccfp): New expander.
(setccfp0, setccfp1): Rename to movccfp0 and movccfp1, respectively.
Reverse fcmp conditions.

From-SVN: r65858

gcc/ChangeLog
gcc/config/pa/pa.md

index 9ecfed750aaf645d357076c9fd7d78023971e6cb..f2167841c800bfa2aa9f599ca867238684ed0fcf 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR/8705
+       * pa.md (movccfp): New expander.
+       (setccfp0, setccfp1): Rename to movccfp0 and movccfp1, respectively.
+       Reverse fcmp conditions.
+
 2003-04-20  Marek Michalkiewicz  <marekm@amelek.gda.pl>
 
        * config/avr/avr.md (*cmpqi_sign_extend): Handle negative values
index 0f50c8ff71d99221b7e053f317ffd1c315738364..523b971fd1919b0bfeb2ad812918047d7e224417 100644 (file)
   [(set_attr "length" "4")
    (set_attr "type" "fpcc")])
 
-;; The following two patterns are optimization placeholders.  In almost
+;; Provide a means to emit the movccfp0 and movccfp1 optimization
+;; placeholders.  This is necessary in rare situations when a
+;; placeholder is re-emitted (see PR 8705).
+
+(define_expand "movccfp"
+  [(set (reg:CCFP 0)
+       (match_operand 0 "const_int_operand" ""))]
+  "! TARGET_SOFT_FLOAT"
+  "
+{
+  if ((unsigned HOST_WIDE_INT) INTVAL (operands[0]) > 1)
+    FAIL;
+}")
+
+;; The following patterns are optimization placeholders.  In almost
 ;; all cases, the user of the condition code will be simplified and the
 ;; original condition code setting insn should be eliminated.
 
-(define_insn "*setccfp0"
+(define_insn "*movccfp0"
   [(set (reg:CCFP 0)
        (const_int 0))]
   "! TARGET_SOFT_FLOAT"
-  "fcmp,dbl,!= %%fr0,%%fr0"
+  "fcmp,dbl,= %%fr0,%%fr0"
   [(set_attr "length" "4")
    (set_attr "type" "fpcc")])
 
-(define_insn "*setccfp1"
+(define_insn "*movccfp1"
   [(set (reg:CCFP 0)
        (const_int 1))]
   "! TARGET_SOFT_FLOAT"
-  "fcmp,dbl,= %%fr0,%%fr0"
+  "fcmp,dbl,!= %%fr0,%%fr0"
   [(set_attr "length" "4")
    (set_attr "type" "fpcc")])