aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/moxie
diff options
context:
space:
mode:
authorAnthony Green <green@gcc.gnu.org>2009-06-10 05:46:07 +0000
committerAnthony Green <green@gcc.gnu.org>2009-06-10 05:46:07 +0000
commit2cd04f4d7a621311c6d26e9cf9a5a56430cdfd05 (patch)
treecd7ee7a9eea758043eb09ea1c51dfb6e84f91213 /gcc/config/moxie
parentcceb575c43dd2f2eebd51c31aefeecfac6529675 (diff)
downloadgcc-2cd04f4d7a621311c6d26e9cf9a5a56430cdfd05.zip
gcc-2cd04f4d7a621311c6d26e9cf9a5a56430cdfd05.tar.gz
gcc-2cd04f4d7a621311c6d26e9cf9a5a56430cdfd05.tar.bz2
Finish committing moxie port
From-SVN: r148340
Diffstat (limited to 'gcc/config/moxie')
-rw-r--r--gcc/config/moxie/moxie.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/moxie/moxie.md b/gcc/config/moxie/moxie.md
index 713bd45..f0d159d 100644
--- a/gcc/config/moxie/moxie.md
+++ b/gcc/config/moxie/moxie.md
@@ -296,15 +296,21 @@
(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)