diff options
author | DJ Delorie <dj@redhat.com> | 2005-08-15 20:31:39 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2005-08-15 20:31:39 -0400 |
commit | eb5f0c07fccb756cbafb0ceaffa8e0527e20d674 (patch) | |
tree | 0f77842fd2ddbb172f87629271e74e13bc213815 /gcc | |
parent | 7f91299bb493e4ab4d0692964adf94c590483cdc (diff) | |
download | gcc-eb5f0c07fccb756cbafb0ceaffa8e0527e20d674.tar.gz |
mov.md (movqi_op): Immediates can't be moved to the stack.
* config/m32c/mov.md (movqi_op): Immediates can't be moved to
the stack.
(movsi_splittable): Allow, but split, moves to the stack.
* config/m32c/m32c.c (m32c_split_move): Always split moves to the
stack.
From-SVN: r103140
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 7 | ||||
-rw-r--r-- | gcc/config/m32c/mov.md | 8 |
3 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fac404bb23e..aff19ef4664 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-08-15 DJ Delorie <dj@redhat.com> + + * config/m32c/mov.md (movqi_op): Immediates can't be moved to + the stack. + (movsi_splittable): Allow, but split, moves to the stack. + * config/m32c/m32c.c (m32c_split_move): Always split moves to the + stack. + 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete. diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index a04d8291095..f44f627c1b9 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -2663,6 +2663,13 @@ m32c_split_move (rtx * operands, enum machine_mode mode, int split_all) debug_rtx (operands[1]); #endif + /* Note that split_all is not used to select the api after this + point, so it's safe to set it to 3 even with define_insn. */ + /* None of the chips can move SI operands to sp-relative addresses, + so we always split those. */ + if (m32c_extra_constraint_p (operands[0], 'S', "Ss")) + split_all = 3; + /* We don't need to split these. */ if (TARGET_A24 && split_all != 3 diff --git a/gcc/config/m32c/mov.md b/gcc/config/m32c/mov.md index 2e18ea3c23e..e146bb6cc20 100644 --- a/gcc/config/m32c/mov.md +++ b/gcc/config/m32c/mov.md @@ -33,9 +33,9 @@ ;; e.g. stdlib/efgcvt.c. (define_insn "movqi_op" [(set (match_operand:QI 0 "mra_qi_operand" - "=Rqi*Rmm, <, RqiSd*Rmm, SdSs, Rqi*Rmm, Sd") + "=Rqi*Rmm, <, RqiSd*Rmm, SdSs, Rqi*Rmm, Sd") (match_operand:QI 1 "mrai_qi_operand" - "iRqi*Rmm, iRqiSd*Rmm, >, iRqi*Rmm, SdSs, i"))] + "iRqi*Rmm, iRqiSd*Rmm, >, Rqi*Rmm, SdSs, i"))] "m32c_mov_ok (operands, QImode)" "@ mov.b\t%1,%0 @@ -168,8 +168,8 @@ ; All SI moves are split if TARGET_A16 (define_insn_and_split "movsi_splittable" - [(set (match_operand:SI 0 "mras_operand" "=Rsi<*Rmm,RsiSd*Rmm") - (match_operand:SI 1 "mrasi_operand" "iRsiSd*Rmm,iRsi>*Rmm"))] + [(set (match_operand:SI 0 "mras_operand" "=Rsi<*Rmm,RsiSd*Rmm,Ss") + (match_operand:SI 1 "mrasi_operand" "iRsiSd*Rmm,iRsi>*Rmm,Rsi*Rmm"))] "TARGET_A16" "#" "TARGET_A16 && reload_completed" |