aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-08-14 13:08:25 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-08-14 13:08:25 -0700
commit2ee5437b4860dcdf3868a9195b1e5d259dfe5a6b (patch)
tree164b333d8511e0e9b1ba00ca41173f3b10cf58f8 /gcc/expr.c
parentaa1b2f7d9546b36301c03c9158d22a3b6eca8cd5 (diff)
downloadgcc-2ee5437b4860dcdf3868a9195b1e5d259dfe5a6b.zip
gcc-2ee5437b4860dcdf3868a9195b1e5d259dfe5a6b.tar.gz
gcc-2ee5437b4860dcdf3868a9195b1e5d259dfe5a6b.tar.bz2
expr.c (emit_group_load): Don't force constants into registers.
* expr.c (emit_group_load): Don't force constants into registers. Special case source already in the correct mode. From-SVN: r35683
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 5a3c303..2592a58 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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,