(expand_divmod): Use target as copy_to_suggested_reg

argument only if it has the same mode as op0.

From-SVN: r5984
This commit is contained in:
Richard Stallman 1993-11-03 20:24:18 +00:00
parent 55abdd3ce2
commit 937aa51bba
1 changed files with 8 additions and 1 deletions

View File

@ -2418,7 +2418,14 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
op0 = force_reg (compute_mode, op0);
if (! can_clobber_op0)
adjusted_op0 = copy_to_suggested_reg (op0, target, compute_mode);
{
if (target && GET_MODE (target) == compute_mode)
adjusted_op0 = target;
else
adjusted_op0 = 0;
adjusted_op0 = copy_to_suggested_reg (op0, adjusted_op0,
compute_mode);
}
}
/* Adjust ADJUSTED_OP0 as described above. Unless CAN_CLOBBER_OP0