Comment #8 on issue 2140 by [email protected]: Fix hardfloat detection
in Linux
http://code.google.com/p/v8/issues/detail?id=2140
My conclusions on this:
The patch submitted by Otavio is invalid. The preprocessor test from the
original code does what it was intended to do.
HOWEVER, ArmUsingHardFloatHelper() and its usage are also incorrect.
In the current implementation asm blocks can be reordered or removed, so it
is not safe.
And more importantly, nothing guarantees that gcc won't clobber the r0, r1,
or d0 registers between the end of the asm block and the function return!
GCC versions from 4.6 will define __ARM_PCS_VFP or __ARM_PCS according to
-mfloat-abi.
Unluckily some versions of GCC 4.5 may support hard-fp without defining
those.
Earlier versions don't support hard-fp.
I think the best solution is to statically return true or false according
to the defines.
For GCC versions 4.5 not using a PCS define we can raise an error linking
to this issue and asking to report it. If it happens we can introduce an
assembly helper similar to the exisiting one to manually check for the ABI.
I am testing a patch and will upload it for review.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev