From c2954af9266e69bc422c3ca6c77fdecd92199070 Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Mon, 20 Jun 2011 12:15:58 +0000 Subject: [PATCH] re PR target/49385 (Invalid RTL intstruction for ARM) Fix PR target/49385 2011-06-20 Ramana Radhakrishnan PR target/49385 * config/arm/thumb2.md (*thumb2_movhi_insn): Make sure atleast one of the operands is a register. From-SVN: r175208 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/thumb2.md | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 673dd46ae14..aa9449b737b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-20 Ramana Radhakrishnan + + PR target/49385 + * config/arm/thumb2.md (*thumb2_movhi_insn): Make sure atleast + one of the operands is a register. + 2011-06-20 Kai Tietz * fold-const.c (fold_binary_loc): Add missing diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 26dcbdde83e..9a11012641d 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -207,7 +207,9 @@ (define_insn "*thumb2_movhi_insn" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r") (match_operand:HI 1 "general_operand" "rI,n,r,m"))] - "TARGET_THUMB2" + "TARGET_THUMB2 + && (register_operand (operands[0], HImode) + || register_operand (operands[1], HImode))" "@ mov%?\\t%0, %1\\t%@ movhi movw%?\\t%0, %L1\\t%@ movhi -- 2.30.2