]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
m32r.c (m32r_expand_block_move): Return 0 if nothing was done.
authorKazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Tue, 24 May 2005 09:43:42 +0000 (09:43 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 24 May 2005 09:43:42 +0000 (09:43 +0000)
* config/m32r/m32r.c (m32r_expand_block_move):  Return 0 if
nothing was done.
* config/m32r/m32r.md (movmemsi):  If m32r_expand_block_move did
nothing then FAIL.
* config/m32r/m32r/m32r-protos.h  (m32r_expand_block_move): Update
prototype.

From-SVN: r100098

gcc/ChangeLog
gcc/config/m32r/m32r-protos.h
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.md

index 8d7ebacf37d949e523699728ec272770357166e8..d705a11fbb917cdb613ffca01d5ac20e6a21eaf6 100644 (file)
@@ -1,3 +1,12 @@
+2005-05-24  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+       * config/m32r/m32r.c (m32r_expand_block_move):  Return 0 if
+       nothing was done.
+       * config/m32r/m32r.md (movmemsi):  If m32r_expand_block_move did
+       nothing then FAIL.
+       * config/m32r/m32r/m32r-protos.h  (m32r_expand_block_move): Update
+       prototype.
+
 2005-05-23  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * unroll.c (loop_iterations): Remove common term from initial
index 9fc7bd446639a0f4fcb1639c5ffd022abd5412b8..b0d977e07e45a1432944883a4edb88ff5353379f 100644 (file)
@@ -51,7 +51,7 @@ extern void   m32r_initialize_trampoline (rtx, rtx, rtx);
 extern int    zero_and_one (rtx, rtx);
 extern char * emit_cond_move (rtx *, rtx);
 extern void   m32r_output_block_move (rtx, rtx *);
-extern void   m32r_expand_block_move (rtx *);
+extern int   m32r_expand_block_move (rtx *);
 extern void   m32r_print_operand (FILE *, rtx, int);
 extern void   m32r_print_operand_address (FILE *, rtx);
 extern int    m32r_not_same_reg (rtx, rtx);
index f932145f6c447368998871c53466e2d79dc0a4a3..76eb15a5c8e0a7ab989fae40449f65212cb4b392 100644 (file)
@@ -2813,7 +2813,7 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx)
    operands[2] is the number of bytes to move.
    operands[3] is the alignment.  */
 
-void
+int
 m32r_expand_block_move (rtx operands[])
 {
   rtx           orig_dst  = operands[0];
@@ -2828,7 +2828,7 @@ m32r_expand_block_move (rtx operands[])
   rtx           dst_reg;
 
   if (constp && bytes <= 0)
-    return;
+    return 1;
 
   /* Move the address into scratch registers.  */
   dst_reg = copy_addr_to_reg (XEXP (orig_dst, 0));
@@ -2843,7 +2843,7 @@ m32r_expand_block_move (rtx operands[])
   if (optimize_size || ! constp || align != UNITS_PER_WORD)
     {
       block_move_call (dst_reg, src_reg, bytes_rtx);
-      return;
+      return 0;
     }
 
   leftover = bytes % MAX_MOVE_BYTES;
@@ -2900,6 +2900,7 @@ m32r_expand_block_move (rtx operands[])
     emit_insn (gen_movstrsi_internal (dst_reg, src_reg, GEN_INT (leftover),
                                      gen_reg_rtx (SImode),
                                      gen_reg_rtx (SImode)));
+    return 1;
 }
 
 \f
index 00f7e05a81fbb76fcbfc1baa106ec460693b4eae..9e8d1eb0f31e88c89786063a0df7c824f938c7c8 100644 (file)
 {
   if (operands[0])             /* avoid unused code messages */
     {
-      m32r_expand_block_move (operands);
-      DONE;
+      if (m32r_expand_block_move (operands))
+        DONE;
+      else
+        FAIL;
     }
 }")