]> gcc.gnu.org Git - gcc.git/commitdiff
* expr.c (move_block_from_reg): Try using an integral mov operation first.
authorDoug Evans <dje@gnu.org>
Sun, 13 Apr 1997 23:29:50 +0000 (23:29 +0000)
committerDoug Evans <dje@gnu.org>
Sun, 13 Apr 1997 23:29:50 +0000 (23:29 +0000)
From-SVN: r13897

gcc/expr.c

index 31e63a1fd8d4af371459d357b773463313c4915f..7a855ad1475f00fa194e984f66e6196febf4a010 100644 (file)
@@ -1717,9 +1717,21 @@ move_block_from_reg (regno, x, nregs, size)
 {
   int i;
   rtx pat, last;
+  enum machine_mode mode;
 
+  /* If SIZE is that of a mode no bigger than a word, just use that
+     mode's store operation.  */
+  if (size <= UNITS_PER_WORD
+      && (mode = mode_for_size (size * BITS_PER_UNIT, MODE_INT, 0)) != BLKmode)
+    {
+      emit_move_insn (change_address (x, mode, NULL),
+                     gen_rtx (REG, mode, regno));
+      return;
+    }
+    
   /* Blocks smaller than a word on a BYTES_BIG_ENDIAN machine must be aligned
-     to the left before storing to memory.  */
+     to the left before storing to memory.  Note that the previous test
+     doesn't handle all cases (e.g. SIZE == 3).  */
   if (size < UNITS_PER_WORD && BYTES_BIG_ENDIAN)
     {
       rtx tem = operand_subword (x, 0, 1, BLKmode);
This page took 0.067847 seconds and 5 git commands to generate.