From: Richard Stallman Date: Wed, 27 May 1992 20:52:20 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: misc/cutover-egcs-0~12830 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8064a5d0ab07d0e39867ee22f8545ec6c4bb904;p=thirdparty%2Fgcc.git *** empty log message *** From-SVN: r1101 --- diff --git a/gcc/expmed.c b/gcc/expmed.c index 07a6c272d7b5..9d0962e6bccd 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2262,6 +2262,11 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) if (rem_flag && GET_CODE (op1) == MEM && MEM_VOLATILE_P (op1)) op1 = force_reg (compute_mode, op1); + /* If we are computing the remainder, op0 will be needed later to calculate + X - Y * (X / Y), therefore cannot be clobbered. */ + if (rem_flag) + can_clobber_op0 = 0; + if (target == 0 || GET_MODE (target) != compute_mode) target = gen_reg_rtx (compute_mode);