OSDN Git Service

Finish committing moxie port
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jun 2009 05:46:07 +0000 (05:46 +0000)
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jun 2009 05:46:07 +0000 (05:46 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148340 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/moxie/moxie.md

index 713bd45..f0d159d 100644 (file)
 (define_expand "cbranchsi4"
   [(set (reg:CC CC_REG)
         (compare:CC
-         (match_operand:SI 1 "register_operand" "")
-         (match_operand:SI 2 "register_operand" "")))
+         (match_operand:SI 1 "general_operand" "")
+         (match_operand:SI 2 "general_operand" "")))
    (set (pc)
         (if_then_else (match_operator:CC 0 "comparison_operator"
                        [(reg:CC CC_REG) (const_int 0)])
                       (label_ref (match_operand 3 "" ""))
                       (pc)))]
   ""
-  "")
+  "
+/* Force the compare operands into registers.  */
+if (GET_CODE (operands[1]) != REG)
+  operands[1] = force_reg (SImode, operands[1]);
+if (GET_CODE (operands[2]) != REG)
+  operands[2] = force_reg (SImode, operands[2]);
+")
 
 (define_insn "*cmpsi"
   [(set (reg:CC CC_REG)