2011-05-03 Stuart Henderson <shenders@gcc.gnu.org>
authorStuart Henderson <shenders@gcc.gnu.org>
Tue, 3 May 2011 16:50:30 +0000 (16:50 +0000)
committerStuart Henderson <shenders@gcc.gnu.org>
Tue, 3 May 2011 16:50:30 +0000 (16:50 +0000)
        From Bernd Schmidt:
        * config/bfin/bfin.md (MOVCC): New mode_macro.
        (mov<mode>cc_insn1, mov<mode>cc_insn2, mov<mode>cc): Renamed from
        movsicc_insn1, movsicc_insn2 and movsicc and macroized.  Remove
        comments from generated assembly.

From-SVN: r173330

gcc/ChangeLog
gcc/config/bfin/bfin.md

index 8124e2289d7247bf29b7dcf98bc181919bec88c2..76908e52813cb798572ed39c4005d0db93db501e 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-03  Stuart Henderson  <shenders@gcc.gnu.org>
+
+       From Bernd Schmidt:
+       * config/bfin/bfin.md (MOVCC): New mode_macro.
+       (mov<mode>cc_insn1, mov<mode>cc_insn2, mov<mode>cc): Renamed from
+       movsicc_insn1, movsicc_insn2 and movsicc and macroized.  Remove
+       comments from generated assembly.
+
 2011-05-03  Stuart Henderson  <shenders@gcc.gnu.org>
 
        From Bernd Schmidt
index 6f2c7a6ee048b7795e8f636bff722cc4622241e8..c4722d4b132b60db542c4e29dfd8a4bb7c902eca 100644 (file)
 
 ;; Conditional moves
 
-(define_expand "movsicc"
-  [(set (match_operand:SI 0 "register_operand" "")
-        (if_then_else:SI (match_operand 1 "comparison_operator" "")
-                         (match_operand:SI 2 "register_operand" "")
-                         (match_operand:SI 3 "register_operand" "")))]
+(define_mode_iterator CCMOV [QI HI SI])
+
+(define_expand "mov<mode>cc"
+  [(set (match_operand:CCMOV 0 "register_operand" "")
+        (if_then_else:CCMOV (match_operand 1 "comparison_operator" "")
+                           (match_operand:CCMOV 2 "register_operand" "")
+                           (match_operand:CCMOV 3 "register_operand" "")))]
   ""
 {
-  operands[1] = bfin_gen_compare (operands[1], SImode);
+  operands[1] = bfin_gen_compare (operands[1], <MODE>mode);
 })
 
-(define_insn "*movsicc_insn1"
-  [(set (match_operand:SI 0 "register_operand" "=da,da,da")
-        (if_then_else:SI
+(define_insn "*mov<mode>cc_insn1"
+  [(set (match_operand:CCMOV 0 "register_operand" "=da,da,da")
+        (if_then_else:CCMOV
            (eq:BI (match_operand:BI 3 "register_operand" "C,C,C")
                (const_int 0))
-           (match_operand:SI 1 "register_operand" "da,0,da")
-           (match_operand:SI 2 "register_operand" "0,da,da")))]
+           (match_operand:CCMOV 1 "register_operand" "da,0,da")
+           (match_operand:CCMOV 2 "register_operand" "0,da,da")))]
   ""
   "@
-    if !cc %0 =%1; /* movsicc-1a */
-    if cc %0 =%2; /* movsicc-1b */
-    if !cc %0 =%1; if cc %0=%2; /* movsicc-1 */"
+    if !cc %0 = %1;
+    if cc %0 = %2;
+    if !cc %0 = %1; if cc %0 = %2;"
   [(set_attr "length" "2,2,4")
    (set_attr "type" "movcc")
    (set_attr "seq_insns" "*,*,multi")])
 
-(define_insn "*movsicc_insn2"
-  [(set (match_operand:SI 0 "register_operand" "=da,da,da")
-        (if_then_else:SI
+(define_insn "*mov<mode>cc_insn2"
+  [(set (match_operand:CCMOV 0 "register_operand" "=da,da,da")
+        (if_then_else:CCMOV
            (ne:BI (match_operand:BI 3 "register_operand" "C,C,C")
                (const_int 0))
-           (match_operand:SI 1 "register_operand" "0,da,da")
-           (match_operand:SI 2 "register_operand" "da,0,da")))]
+           (match_operand:CCMOV 1 "register_operand" "0,da,da")
+           (match_operand:CCMOV 2 "register_operand" "da,0,da")))]
   ""
   "@
-   if !cc %0 =%2; /* movsicc-2b */
-   if cc %0 =%1; /* movsicc-2a */
-   if cc %0 =%1; if !cc %0=%2; /* movsicc-1 */"
+   if !cc %0 = %2;
+   if cc %0 = %1;
+   if cc %0 = %1; if !cc %0 = %2;"
   [(set_attr "length" "2,2,4")
    (set_attr "type" "movcc")
    (set_attr "seq_insns" "*,*,multi")])