summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/optabs.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-01-03 17:16:04 +0000
committerobrien <obrien@FreeBSD.org>2001-01-03 17:16:04 +0000
commite103926ab58446425b46d5df55c940db3abeff84 (patch)
tree46177f22832f755e34be042b91555eedf10b4f66 /contrib/gcc/optabs.c
parentd566d0a5f8c3f4d187ecbf8096628e9ae9dd3567 (diff)
downloadFreeBSD-src-e103926ab58446425b46d5df55c940db3abeff84.zip
FreeBSD-src-e103926ab58446425b46d5df55c940db3abeff84.tar.gz
Enlist the FreeBSD-CURRENT users as testers of GCC 2.95.3 Release Candidate #1
Diffstat (limited to 'contrib/gcc/optabs.c')
-rw-r--r--contrib/gcc/optabs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/gcc/optabs.c b/contrib/gcc/optabs.c
index 2b9091b..bb875ee 100644
--- a/contrib/gcc/optabs.c
+++ b/contrib/gcc/optabs.c
@@ -2887,8 +2887,14 @@ emit_libcall_block (insns, target, result, equiv)
rtx result;
rtx equiv;
{
+ rtx final_dest = target;
rtx prev, next, first, last, insn;
+ /* If this is a reg with REG_USERVAR_P set, then it could possibly turn
+ into a MEM later. Protect the libcall block from this change. */
+ if (! REG_P (target) || REG_USERVAR_P (target))
+ target = gen_reg_rtx (GET_MODE (target));
+
/* look for any CALL_INSNs in this sequence, and attach a REG_EH_REGION
reg note to indicate that this call cannot throw. (Unless there is
already a REG_EH_REGION note.) */
@@ -2952,6 +2958,9 @@ emit_libcall_block (insns, target, result, equiv)
!= CODE_FOR_nothing)
set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv));
+ if (final_dest != target)
+ emit_move_insn (final_dest, target);
+
if (prev == 0)
first = get_insns ();
else
OpenPOWER on IntegriCloud