| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 91549a274a7d4e361d423c655d204f607c4fab69..4318f31689916634f23032167ece94f30d05f8be 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -1234,7 +1234,7 @@ void LCodeGen::DoModI(LModI* instr) {
|
| __ and_(dividend, divisor - 1);
|
| __ bind(&done);
|
| } else {
|
| - Label done, remainder_eq_dividend, slow, do_subtraction, both_positive;
|
| + Label done, remainder_eq_dividend, slow, both_positive;
|
| Register left_reg = ToRegister(instr->left());
|
| Register right_reg = ToRegister(instr->right());
|
| Register result_reg = ToRegister(instr->result());
|
| @@ -1270,23 +1270,10 @@ void LCodeGen::DoModI(LModI* instr) {
|
| __ mov(scratch, right_reg);
|
| __ sub(Operand(scratch), Immediate(1));
|
| __ test(scratch, Operand(right_reg));
|
| - __ j(not_zero, &do_subtraction, Label::kNear);
|
| + __ j(not_zero, &slow, Label::kNear);
|
| __ and_(left_reg, Operand(scratch));
|
| __ jmp(&remainder_eq_dividend, Label::kNear);
|
|
|
| - __ bind(&do_subtraction);
|
| - const int kUnfolds = 3;
|
| - // Try a few subtractions of the dividend.
|
| - __ mov(scratch, left_reg);
|
| - for (int i = 0; i < kUnfolds; i++) {
|
| - // Reduce the dividend by the divisor.
|
| - __ sub(left_reg, Operand(right_reg));
|
| - // Check if the dividend is less than the divisor.
|
| - __ cmp(left_reg, Operand(right_reg));
|
| - __ j(less, &remainder_eq_dividend, Label::kNear);
|
| - }
|
| - __ mov(left_reg, scratch);
|
| -
|
| // Slow case, using idiv instruction.
|
| __ bind(&slow);
|
|
|
|
|