| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 39a5477f525531e9d0166ddebae8026c41e8186f..3f8470de48a2442678ebfaf29925b5e796439a67 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -1672,19 +1672,16 @@ void LCodeGen::DoSubI(LSubI* instr) {
|
| } else { // can_overflow.
|
| Register overflow = scratch0();
|
| Register scratch = scratch1();
|
| - if (right->IsStackSlot() || right->IsConstantOperand()) {
|
| + if (right->IsStackSlot()) {
|
| Register right_reg = EmitLoadRegister(right, scratch);
|
| __ SubuAndCheckForOverflow(ToRegister(result),
|
| ToRegister(left),
|
| right_reg,
|
| overflow); // Reg at also used as scratch.
|
| } else {
|
| - DCHECK(right->IsRegister());
|
| - // Due to overflow check macros not supporting constant operands,
|
| - // handling the IsConstantOperand case was moved to prev if clause.
|
| - __ SubuAndCheckForOverflow(ToRegister(result),
|
| - ToRegister(left),
|
| - ToRegister(right),
|
| + DCHECK(right->IsRegister() || right->IsConstantOperand());
|
| + __ SubuAndCheckForOverflow(ToRegister(result), ToRegister(left),
|
| + ToOperand(right),
|
| overflow); // Reg at also used as scratch.
|
| }
|
| DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow,
|
| @@ -1872,20 +1869,16 @@ void LCodeGen::DoAddI(LAddI* instr) {
|
| } else { // can_overflow.
|
| Register overflow = scratch0();
|
| Register scratch = scratch1();
|
| - if (right->IsStackSlot() ||
|
| - right->IsConstantOperand()) {
|
| + if (right->IsStackSlot()) {
|
| Register right_reg = EmitLoadRegister(right, scratch);
|
| __ AdduAndCheckForOverflow(ToRegister(result),
|
| ToRegister(left),
|
| right_reg,
|
| overflow); // Reg at also used as scratch.
|
| } else {
|
| - DCHECK(right->IsRegister());
|
| - // Due to overflow check macros not supporting constant operands,
|
| - // handling the IsConstantOperand case was moved to prev if clause.
|
| - __ AdduAndCheckForOverflow(ToRegister(result),
|
| - ToRegister(left),
|
| - ToRegister(right),
|
| + DCHECK(right->IsRegister() || right->IsConstantOperand());
|
| + __ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left),
|
| + ToOperand(right),
|
| overflow); // Reg at also used as scratch.
|
| }
|
| DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow,
|
|
|