expr.c (emit_group_load): Don't force constants into registers.
authorRichard Henderson <rth@cygnus.com>
Mon, 14 Aug 2000 20:08:25 +0000 (13:08 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 14 Aug 2000 20:08:25 +0000 (13:08 -0700)
        * expr.c (emit_group_load): Don't force constants into registers.
        Special case source already in the correct mode.

From-SVN: r35683

gcc/ChangeLog
gcc/expr.c

index 16bd605e5334a61ff542785fa28faa0067d4d4f4..37c992d258de7b715102a0e6b192581ce560097e 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-14  Richard Henderson  <rth@cygnus.com>
+
+       * expr.c (emit_group_load): Don't force constants into registers.
+       Special case source already in the correct mode.
+
 2000-08-14  Zack Weinberg  <zack@wolery.cumb.org>
 
        * configure.in: Accept *-*-linux* not just *-*-linux-gnu*.
index 5a3c303fa4b4ee67384f0d424d3a2c88a1a5b940..2592a58a66aa09f66d719ebabc89a6289a66b434 100644 (file)
@@ -1938,7 +1938,7 @@ emit_group_load (dst, orig_src, ssize, align)
   /* If we won't be loading directly from memory, protect the real source
      from strange tricks we might play.  */
   src = orig_src;
-  if (GET_CODE (src) != MEM)
+  if (GET_CODE (src) != MEM && ! CONSTANT_P (src))
     {
       if (GET_MODE (src) == VOIDmode)
        src = gen_reg_rtx (GET_MODE (dst));
@@ -1987,6 +1987,10 @@ emit_group_load (dst, orig_src, ssize, align)
          else
            abort ();
        }
+      else if ((CONSTANT_P (src)
+               && (GET_MODE (src) == VOIDmode || GET_MODE (src) == mode))
+              || (GET_CODE (src) == REG && GET_MODE (src) == mode))
+       tmps[i] = src;
       else
        tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT,
                                     bytepos * BITS_PER_UNIT, 1, NULL_RTX,