Truncate rather than round to nearest when performing float-to-integer
authorkbr@chromium.org <kbr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Jan 2011 21:51:50 +0000 (21:51 +0000)
committerkbr@chromium.org <kbr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Jan 2011 21:51:50 +0000 (21:51 +0000)
commit27f0ae7aad3728f90b66aa87d66d3ce58835d10a
tree5235aefc00165f617cf80f56573e4e9936285cc1
parent11a4cb5718b5dc7f75ae7fa1254fd793ab8dbebd
Truncate rather than round to nearest when performing float-to-integer
conversions for external array types, which implement the Typed Array
spec. The new code paths are for SSE3 and SSE2 capable processors.
The code for non-SSE2 processors is unchanged for now. The ARM port
appears to already be correct.

Moved the generation of the external array load and store intrinsics
to the stub cache (on all platforms) so that they are generated at run
time and can take advantage of CPU features.

This functionality is covered by the array-unit-tests.html test in the
WebGL conformance test suite:
http://khronos.org/webgl/wiki/Testing/Conformance
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/array-unit-tests.html

Manually verified all of the SSE3/SSE2/non-SSE2 code paths by enabling
each in turn. Tested in Chromium on 32-bit Mac OS X and 64-bit Linux.

BUG=http://code.google.com/p/chromium/issues/detail?id=50972
TEST=none (see above)

Review URL: http://codereview.chromium.org/6315004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
18 files changed:
src/arm/ic-arm.cc
src/arm/stub-cache-arm.cc
src/builtins.cc
src/builtins.h
src/heap.h
src/ia32/ic-ia32.cc
src/ia32/stub-cache-ia32.cc
src/ic.cc
src/ic.h
src/mips/ic-mips.cc
src/mips/stub-cache-mips.cc
src/stub-cache.cc
src/stub-cache.h
src/x64/assembler-x64.cc
src/x64/assembler-x64.h
src/x64/disasm-x64.cc
src/x64/ic-x64.cc
src/x64/stub-cache-x64.cc