diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-06 07:25:21 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-06 07:25:21 -0400 |
commit | 22619c3f61d8e60b5a45a75b4edec2d442f0ee02 (patch) | |
tree | d6eab528be0a0e69347a7278050b3902e599be23 /gcc | |
parent | ce15adaa116fa31401863c4d2f94dd507e935af2 (diff) | |
download | gcc-22619c3f61d8e60b5a45a75b4edec2d442f0ee02.zip gcc-22619c3f61d8e60b5a45a75b4edec2d442f0ee02.tar.gz gcc-22619c3f61d8e60b5a45a75b4edec2d442f0ee02.tar.bz2 |
(store_expr): Don't clobber TEMP with address.
From-SVN: r8227
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -2743,6 +2743,7 @@ store_expr (exp, target, want_value) The string constant may be shorter than the array. So copy just the string's actual length, and clear the rest. */ rtx size; + rtx addr; /* Get the size of the data type of the string, which is actually the size of the target. */ @@ -2771,17 +2772,16 @@ store_expr (exp, target, want_value) that we have to clear. */ if (GET_CODE (copy_size_rtx) == CONST_INT) { - temp = plus_constant (XEXP (target, 0), + addr = plus_constant (XEXP (target, 0), TREE_STRING_LENGTH (exp)); - size = plus_constant (size, - - TREE_STRING_LENGTH (exp)); + size = plus_constant (size, - TREE_STRING_LENGTH (exp)); } else { enum machine_mode size_mode = Pmode; - temp = force_reg (Pmode, XEXP (target, 0)); - temp = expand_binop (size_mode, add_optab, temp, + addr = force_reg (Pmode, XEXP (target, 0)); + addr = expand_binop (size_mode, add_optab, addr, copy_size_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); @@ -2798,13 +2798,14 @@ store_expr (exp, target, want_value) if (size != const0_rtx) { #ifdef TARGET_MEM_FUNCTIONS - emit_library_call (memset_libfunc, 0, VOIDmode, 3, - temp, Pmode, const0_rtx, Pmode, size, Pmode); + emit_library_call (memset_libfunc, 0, VOIDmode, 3, addr, + Pmode, const0_rtx, Pmode, size, Pmode); #else emit_library_call (bzero_libfunc, 0, VOIDmode, 2, - temp, Pmode, size, Pmode); + addr, Pmode, size, Pmode); #endif } + if (label) emit_label (label); } |