Commit dcf8251e authored by marija.antic's avatar marija.antic Committed by Commit bot

MIPS: Fix 'Port [turbofan] Introduce integer multiplication with overflow.'

Port 8e18a5f2

Failing on r6 due to wrong registers used in macro assembler.

TEST=test-run-machops/RunInt32MulWithOverflowImm
BUG=

Review-Url: https://codereview.chromium.org/2165533002
Cr-Commit-Position: refs/heads/master@{#37861}
parent 4de5e145
......@@ -5648,9 +5648,16 @@ void MacroAssembler::MulBranchOvf(Register dst, Register left, Register right,
DCHECK(!scratch.is(left));
DCHECK(!scratch.is(right));
Mul(overflow_dst, dst, left, right);
sra(scratch, dst, 31);
xor_(overflow_dst, overflow_dst, scratch);
if (IsMipsArchVariant(kMips32r6) && dst.is(right)) {
mov(scratch, right);
Mul(overflow_dst, dst, left, scratch);
sra(scratch, dst, 31);
xor_(overflow_dst, overflow_dst, scratch);
} else {
Mul(overflow_dst, dst, left, right);
sra(scratch, dst, 31);
xor_(overflow_dst, overflow_dst, scratch);
}
BranchOvfHelperMult(this, overflow_dst, overflow_label, no_overflow_label);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment