Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 6dc0171b00b11e4cbc3659ce07243f2f1d703b16..808a3831ab82e8dcf8567a1613859135b1215539 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1441,6 +1441,7 @@ void LCodeGen::DoDivI(LDivI* instr) { |
__ cmp(dividend, 0); |
__ j(less, &negative, Label::kNear); |
__ sar(dividend, power); |
+ if (divisor < 0) __ neg(dividend); |
__ jmp(&done, Label::kNear); |
__ bind(&negative); |