aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-09-30 01:39:35 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-09-30 01:39:35 +0000
commit7ce3fc8ffed7f487ea24b17a01ace93082787d5e (patch)
tree55b63db8c40918329d735b5d045aceb9f60266e3 /gcc
parente670d9e4cec6b4d18e98bf8e0fddc0373d781c9f (diff)
downloadgcc-7ce3fc8ffed7f487ea24b17a01ace93082787d5e.zip
gcc-7ce3fc8ffed7f487ea24b17a01ace93082787d5e.tar.gz
gcc-7ce3fc8ffed7f487ea24b17a01ace93082787d5e.tar.bz2
builtins.c (expand_builtin_strlen): Do not call emit_move_insn with a PLUS as source operand.
* builtins.c (expand_builtin_strlen): Do not call emit_move_insn with a PLUS as source operand. (expand_movstr): Likewise. (expand_builtin_stpcpy): Likewise. From-SVN: r88322
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/builtins.c14
2 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c58b388..8f4b396 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-29 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * builtins.c (expand_builtin_strlen): Do not call emit_move_insn
+ with a PLUS as source operand.
+ (expand_movstr): Likewise.
+ (expand_builtin_stpcpy): Likewise.
+
2004-09-29 Richard Henderson <rth@redhat.com>
PR 17739
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 1aeae96..039110a 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -2433,8 +2433,7 @@ expand_builtin_strlen (tree arglist, rtx target,
/* Now that we are assured of success, expand the source. */
start_sequence ();
- pat = memory_address (BLKmode,
- expand_expr (src, src_reg, ptr_mode, EXPAND_SUM));
+ pat = expand_expr (src, src_reg, ptr_mode, EXPAND_NORMAL);
if (pat != src_reg)
emit_move_insn (src_reg, pat);
pat = get_insns ();
@@ -3045,8 +3044,10 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
terminator. If the caller requested a mempcpy-like return value,
adjust it. */
if (endp == 1 && target != const0_rtx)
- emit_move_insn (target, plus_constant (gen_lowpart (GET_MODE (target),
- end), 1));
+ {
+ rtx tem = plus_constant (gen_lowpart (GET_MODE (target), end), 1);
+ emit_move_insn (target, force_operand (tem, NULL_RTX));
+ }
return target;
}
@@ -3156,9 +3157,8 @@ expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode)
if (GET_MODE (target) != GET_MODE (ret))
ret = gen_lowpart (GET_MODE (target), ret);
- ret = emit_move_insn (target,
- plus_constant (ret,
- INTVAL (len_rtx)));
+ ret = plus_constant (ret, INTVAL (len_rtx));
+ ret = emit_move_insn (target, force_operand (ret, NULL_RTX));
gcc_assert (ret);
return target;