Bug 1344597 - Baldr: MIPS: Fix trap type of unsigned divide by zero

Tag: #1542
This commit is contained in:
Jiaxun Yang 2020-05-12 12:40:04 +08:00 committed by Roy Tam
commit 5a62948a43

View file

@ -2412,7 +2412,7 @@ CodeGeneratorMIPSShared::visitUDivOrMod(LUDivOrMod* ins)
if (ins->canBeDivideByZero()) {
if (ins->mir()->isTruncated()) {
if (ins->trapOnError()) {
masm.ma_b(rhs, rhs, trap(ins, wasm::Trap::InvalidConversionToInteger), Assembler::Zero);
masm.ma_b(rhs, rhs, trap(ins, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
} else {
// Infinity|0 == 0
Label notzero;