ibmruntimes / v8ppc

Port of Google V8 javascript engine to PowerPC®
Other
94 stars 19 forks source link

Convert MacroAssembler::EmitECMATruncate (fMASM6) #77

Closed mtbrandy closed 11 years ago

mtbrandy commented 11 years ago

This is the current point of failure for 37 tests.

mtbrandy commented 11 years ago

After we have an implementation of this routine, the following commits should be reverted (such that the code uses EmitECMATruncate rather than the temporary helper functions):

13f13aeb9 GenerateStoreExternalArray: implement missing double to int conversion 54a545f2d Add FloatingPointHelper::ConvertDoubleToInt/ConvertDoubleToUnsignedInt for use by GenerateStoreExternalArray.

pengwuibm commented 11 years ago

I'll take this one. Here is one test case to start with:

out/ppc.debug/d8 test/mjsunit/mjsunit.js test/mjsunit/array-indexing.js

Hit ARM opcode: 64(FAKE_OPCODE defined in constant-ppc.h)

#

Fatal error in ../src/ppc/simulator-ppc.cc, line 2939

unimplemented code

pengwuibm commented 11 years ago

Implemented EmitECMATruncate in 080a5d47778d123479b8e14343452c32416675b3. Will address GenerateStoreExternalArray and ConvertDoubleToInt in next fix.

Now, array-indexing.js passes in simulator mode, but time-out in native-ppc (not sure if it's related to this fix or not, will track it separately).

pengwuibm commented 11 years ago

Fixed a bug in native-ppc mapping (c83bf2860dd6559438c8ed1938bd51f776d0b238), now array-indexing.js is passing.

Also replace the use of ConvertDoubleToInt(UnsignedInt) in GenerateStoreExternalArray with EmitECMATruncate (which handles the overflow/underflow/infinity condition according to ECMA rules) 746de9d75999f008d30e1a293c1fdfc228a00272