calls.c (expand_call): If TARGET is passed by reference and is readonly, write a CLOBBER.

* calls.c (expand_call): If TARGET is passed by reference and
	is readonly, write a CLOBBER.

From-SVN: r32716
This commit is contained in:
Richard Kenner 2000-03-23 22:12:22 +00:00 committed by Richard Kenner
parent 4b2a62db33
commit 25a1fcb433
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Thu Mar 23 17:10:48 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* calls.c (expand_call): If TARGET is passed by reference and
is readonly, write a CLOBBER.
2000-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (expand_builtin): Handle bcmp.

View File

@ -2776,6 +2776,14 @@ expand_call (exp, target, ignore)
if (is_longjmp)
current_function_calls_longjmp = 1, sibcall_failure = 1;
/* If this function is returning into a memory location marked as
readonly, it means it is initializing that location. But we normally
treat functions as not clobbering such locations, so we need to
specify that this one does. */
if (target != 0 && GET_CODE (target) == MEM
&& structure_value_addr != 0 && RTX_UNCHANGING_P (target))
emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
/* If value type not void, return an rtx for the value. */
/* If there are cleanups to be called, don't use a hard reg as target.