Updates:
Status: Assigned
Owner: [email protected]
Cc: [email protected]
Comment #2 on issue 2458 by [email protected]: Very simple function of
float32array deopts on ia32
http://code.google.com/p/v8/issues/detail?id=2458
The instruction sequence for detection of int32 seems to be wrong, we use
__ cvttsd2si(ecx, Operand(xmm0));
__ cvtsi2sd(xmm2, ecx);
__ pcmpeqd(xmm2, xmm0);
__ movmskpd(ecx, xmm2);
__ test(ecx, Immediate(1));
__ j(zero, ¬_int32);
pcmpeqd compares 32bit chunks independently and produces results in bits
0..31 and 32..63 so extracting a single sign bit from 64 bit value is not
enough. Both 63 and 31 should be extracted with movmskps and both must be 1.
Right now we think that 1343238.25 is an int32 because 1343238.25 and
1343238 in double representation have the same bits at 32..63 and differ
only at 0..31 which we miss.
I think
__ cvttsd2si(ecx, Operand(xmm0));
__ cvtsi2sd(xmm2, ecx);
__ pcmpeqd(xmm2, xmm0);
__ movmskps(ecx, xmm2);
__ cmp(ecx, Immediate(2));
__ j(not_equal, ¬_int32);
should work (but I did read the code around to check what would be the
state of bits 64..127, we might have to zero them).
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev