Reviewers: Karl Klose,
Description:
ARM: Fix instruction double to i
The double to i convertion should round to zero not infinity.
Thes bug was revealed by http://codereview.chromium.org/6597003, where the
value
of (x * 1.0000000001) | 0 was x - 1 and not x when x was a negative smi.
I will not commit http://codereview.chromium.org/6597003 before this is
committed.
TEST=test/mjsunit/smi-ops-inlined.js
Please review this at http://codereview.chromium.org/6594008/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/arm/lithium-codegen-arm.cc
Index: src/arm/lithium-codegen-arm.cc
===================================================================
--- src/arm/lithium-codegen-arm.cc (revision 6946)
+++ src/arm/lithium-codegen-arm.cc (working copy)
@@ -3371,7 +3371,7 @@
Register scratch1 = scratch0();
Register scratch2 = ToRegister(instr->TempAt(0));
- VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf
+ VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToZero
: kRoundToNearest;
EmitVFPTruncate(rounding_mode,
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev