mov.md (movqi_op): Immediates can't be moved to the stack.
authorDJ Delorie <dj@redhat.com>
Tue, 16 Aug 2005 00:31:39 +0000 (20:31 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Tue, 16 Aug 2005 00:31:39 +0000 (20:31 -0400)
* 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

gcc/ChangeLog
gcc/config/m32c/m32c.c
gcc/config/m32c/mov.md

index fac404bb23e18b349bdaf66e0277994848b68bb9..aff19ef4664d4d00008032fd48cee43c6e658c78 100644 (file)
@@ -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.
index a04d8291095ddd29f9722f18cd5eb43060d4300b..f44f627c1b90c7136f709588809a085726d1abdb 100644 (file)
@@ -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
index 2e18ea3c23e539fe8ebe1f19245ff548381c054a..e146bb6cc20d1f921822bcf1ac2b8fe420b88cfe 100644 (file)
@@ -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
 
 ; 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"