Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index a1f4ad184bfb185073616b4164d556b4ec91ce73..85f025594f9cfb6e7e533ab872a2ed23c51a1ed2 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -1216,6 +1216,7 @@ void LCodeGen::DoDivI(LDivI* instr) { |
__ cmpl(dividend, Immediate(0)); |
__ j(less, &negative, Label::kNear); |
__ sarl(dividend, Immediate(power)); |
+ if (divisor < 0) __ negl(dividend); |
__ jmp(&done, Label::kNear); |
__ bind(&negative); |