From 5d2b84f840a7f6a1f57b9cde09693ce2cd91d3d3 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 26 Aug 2008 10:12:20 -0600 Subject: [PATCH] mn10300.md (movqi, movhi): Split i->d*a case into two cases to avoid the possibility of getting... * mn10300.md (movqi, movhi): Split i->d*a case into two cases to avoid the possibility of getting DATA_OR_ADDRESS_REGS as the preferred class when copying a constant into a partial word register. From-SVN: r139600 --- gcc/ChangeLog | 6 ++++++ gcc/config/mn10300/mn10300.md | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 68763ec9c3a..876805354fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-08-26 Jeff Law + + * mn10300.md (movqi, movhi): Split i->d*a case into two cases to + avoid the possibility of getting DATA_OR_ADDRESS_REGS as the + preferred class when copying a constant into a partial word register. + 2008-08-26 Ben Elliston * rtlanal.c: Fix uses of "it's" with "its" where appropriate. diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 73043e99b1a..8fbbdc87df5 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -115,8 +115,8 @@ [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=d*a,d,d*a,d,m") - (match_operand:QI 1 "general_operand" "0,I,dai,m,d"))] + [(set (match_operand:QI 0 "nonimmediate_operand" "=d*a,d,d,!*a,d*a,d,m") + (match_operand:QI 1 "general_operand" "0,I,i,i,da,m,d"))] "register_operand (operands[0], QImode) || register_operand (operands[1], QImode)" "* @@ -128,6 +128,8 @@ case 1: return \"clr %0\"; case 2: + case 3: + case 4: if (GET_CODE (operands[1]) == CONST_DOUBLE) { rtx xoperands[2]; @@ -138,14 +140,14 @@ } return \"mov %1,%0\"; - case 3: - case 4: + case 5: + case 6: return \"movbu %1,%0\"; default: gcc_unreachable (); } }" - [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]) + [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) ;; movhi @@ -208,8 +210,8 @@ [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=d*a,d,d*a,d,m") - (match_operand:HI 1 "general_operand" "0,I,dai,m,d"))] + [(set (match_operand:HI 0 "nonimmediate_operand" "=d*a,d,d,!*a,d*a,d,m") + (match_operand:HI 1 "general_operand" "0,I,i,i,da,m,d"))] "register_operand (operands[0], HImode) || register_operand (operands[1], HImode)" "* @@ -221,6 +223,8 @@ case 1: return \"clr %0\"; case 2: + case 3: + case 4: if (GET_CODE (operands[1]) == CONST_DOUBLE) { rtx xoperands[2]; @@ -230,14 +234,14 @@ return \"\"; } return \"mov %1,%0\"; - case 3: - case 4: + case 5: + case 6: return \"movhu %1,%0\"; default: gcc_unreachable (); } }" - [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]) + [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) ;; movsi and helpers