Commit 50f18b83 authored by bmeurer's avatar bmeurer Committed by Commit bot

[stubs] Fix invalid IntPtrMul in DivideStub.

R=jarin@chromium.org
BUG=v8:5268

Review-Url: https://codereview.chromium.org/2375863002
Cr-Commit-Position: refs/heads/master@{#39805}
parent 06eef6e6
...@@ -1845,7 +1845,7 @@ compiler::Node* DivideStub::Generate(CodeStubAssembler* assembler, ...@@ -1845,7 +1845,7 @@ compiler::Node* DivideStub::Generate(CodeStubAssembler* assembler,
Node* untagged_result = Node* untagged_result =
assembler->Int32Div(untagged_dividend, untagged_divisor); assembler->Int32Div(untagged_dividend, untagged_divisor);
Node* truncated = Node* truncated =
assembler->IntPtrMul(untagged_result, untagged_divisor); assembler->Int32Mul(untagged_result, untagged_divisor);
// Do floating point division if the remainder is not 0. // Do floating point division if the remainder is not 0.
assembler->GotoIf( assembler->GotoIf(
assembler->Word32NotEqual(untagged_dividend, truncated), &bailout); assembler->Word32NotEqual(untagged_dividend, truncated), &bailout);
...@@ -2048,7 +2048,7 @@ compiler::Node* DivideWithFeedbackStub::Generate( ...@@ -2048,7 +2048,7 @@ compiler::Node* DivideWithFeedbackStub::Generate(
Node* untagged_result = Node* untagged_result =
assembler->Int32Div(untagged_dividend, untagged_divisor); assembler->Int32Div(untagged_dividend, untagged_divisor);
Node* truncated = assembler->IntPtrMul(untagged_result, untagged_divisor); Node* truncated = assembler->Int32Mul(untagged_result, untagged_divisor);
// Do floating point division if the remainder is not 0. // Do floating point division if the remainder is not 0.
assembler->GotoIf(assembler->Word32NotEqual(untagged_dividend, truncated), assembler->GotoIf(assembler->Word32NotEqual(untagged_dividend, truncated),
&bailout); &bailout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment