Revision: 6951
Author: [email protected]
Date: Fri Feb 25 05:04:07 2011
Log: 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
Review URL: http://codereview.chromium.org/6594008
http://code.google.com/p/v8/source/detail?r=6951
Modified:
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Thu Feb 24
02:07:35 2011
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Fri Feb 25
05:04:07 2011
@@ -3371,10 +3371,7 @@
Register scratch1 = scratch0();
Register scratch2 = ToRegister(instr->TempAt(0));
- VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf
- : kRoundToNearest;
-
- EmitVFPTruncate(rounding_mode,
+ EmitVFPTruncate(kRoundToZero,
single_scratch,
double_input,
scratch1,
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev