aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-01-20 18:21:28 -0800
committerRichard Henderson <rth@gcc.gnu.org>1999-01-20 18:21:28 -0800
commitee5332b81a9cd1dea4c73f596648ae70533f5fe5 (patch)
tree4c960fd14fd699be96f9a90c1bf2065a35c3be43 /gcc/expr.c
parent898df643ab776bbaead668113abbb08b77d5f4a1 (diff)
downloadgcc-ee5332b81a9cd1dea4c73f596648ae70533f5fe5.zip
gcc-ee5332b81a9cd1dea4c73f596648ae70533f5fe5.tar.gz
gcc-ee5332b81a9cd1dea4c73f596648ae70533f5fe5.tar.bz2
cse.c (fold_rtx): Revert 29 Dec change.
* cse.c (fold_rtx): Revert 29 Dec change. (cse_insn): Revert 12 Jan change. * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX. * regclass.c (reg_scan_mark_refs): Revert 29 Dec change. * rtl.def: Likewise. * rtl.h (CONSTANT_P): Likewise. * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX to memory. * recog.c (immediate_operand): Accept CONSTANT_P_RTX. * alpha.c (input_operand): Likewise. * c4x.c (const_operand): Likewise. * explow.c (allocate_dynamic_stack_space): Use register_operand instead of arith_operand, which does not exist. * 1750a.h: Fix comment closure. * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change. * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch. * arm.h (TARGET_SWITCHES): Fix typo. * i370.md (anon mult and div patterns): Fix set mode mismatch. * i860.c (output_delayed_branch): Fix operands to constrain_operands. (output_delay_insn): Likewise. * m88k.md (anon rotate insns): Fix set mode mismatch. (anon BLKmode moves): Commonize and fix set mode mismatches. * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch. * romp.md (movdf): Fix typo. From-SVN: r24796
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 67487ac..1fd2afb 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2497,7 +2497,10 @@ emit_move_insn (x, y)
if (mode == BLKmode || (GET_MODE (y) != mode && GET_MODE (y) != VOIDmode))
abort ();
- if (CONSTANT_P (y) && ! LEGITIMATE_CONSTANT_P (y))
+ /* Never force constant_p_rtx to memory. */
+ if (GET_CODE (y) == CONSTANT_P_RTX)
+ ;
+ else if (CONSTANT_P (y) && ! LEGITIMATE_CONSTANT_P (y))
y = force_const_mem (mode, y);
/* If X or Y are memory references, verify that their addresses are valid
@@ -8993,16 +8996,11 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|| POINTER_TYPE_P (TREE_TYPE (arg)))
return const0_rtx;
- /* Otherwise, emit (const (constant_p_rtx (ARG))) and let CSE
- get a chance to see if it can deduce whether ARG is constant. */
- /* ??? We always generate the CONST in ptr_mode since that's
- certain to be valid on this machine, then convert it to
- whatever we need. */
+ /* Otherwise, emit (constant_p_rtx (ARG)) and let CSE get a
+ chance to see if it can deduce whether ARG is constant. */
tmp = expand_expr (arg, NULL_RTX, VOIDmode, 0);
- tmp = gen_rtx_CONSTANT_P_RTX (ptr_mode, tmp);
- tmp = gen_rtx_CONST (ptr_mode, tmp);
- tmp = convert_to_mode (value_mode, tmp, 0);
+ tmp = gen_rtx_CONSTANT_P_RTX (value_mode, tmp);
return tmp;
}