Commit 41113d73 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix Windows build.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10578039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e4f4aad2
......@@ -1083,9 +1083,9 @@ void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) {
static_cast<double>(static_cast<uint64_t>(1) << shift) / divisor_abs;
int64_t multiplier;
if (multiplier_f - floor(multiplier_f) < 0.5) {
multiplier = floor(multiplier_f);
multiplier = static_cast<int64_t>(floor(multiplier_f));
} else {
multiplier = floor(multiplier_f) + 1;
multiplier = static_cast<int64_t>(floor(multiplier_f)) + 1;
}
// The multiplier is a uint32.
ASSERT(multiplier > 0 &&
......@@ -1096,7 +1096,7 @@ void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) {
__ test(dividend, dividend);
DeoptimizeIf(zero, instr->environment());
}
__ mov(edx, multiplier);
__ mov(edx, static_cast<int32_t>(multiplier));
__ imul(edx);
if (static_cast<int32_t>(multiplier) < 0) {
__ add(edx, scratch);
......
......@@ -945,9 +945,9 @@ void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) {
static_cast<double>(static_cast<uint64_t>(1) << shift) / divisor_abs;
int64_t multiplier;
if (multiplier_f - floor(multiplier_f) < 0.5) {
multiplier = floor(multiplier_f);
multiplier = static_cast<int64_t>(floor(multiplier_f));
} else {
multiplier = floor(multiplier_f) + 1;
multiplier = static_cast<int64_t>(floor(multiplier_f)) + 1;
}
// The multiplier is a uint32.
ASSERT(multiplier > 0 &&
......
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