Reviewers: Jakob,
Message:
PTAL.
Description:
Fix Windows build.
BUG=
TEST=
Please review this at http://codereview.chromium.org/10578039/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ia32/lithium-codegen-ia32.cc
M src/x64/lithium-codegen-x64.cc
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc
b/src/ia32/lithium-codegen-ia32.cc
index
abac9642244db89b450eb720a2cf1e9a2f86f9e5..33f02b6696760b180894b0ca6a490a7fa3430500
100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -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);
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index
4f71f83bf958cd4c6e36e3fa6dfeac0c265f25b6..5d4316af1c8d4adde1770818d74d367cc52d78be
100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -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 &&
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev