Status: New
Owner: ----
New issue 1996 by [email protected]: VFP3 detection logic is incorrect
http://code.google.com/p/v8/issues/detail?id=1996
The VFP detection logic in assembler-arm.cc appears incorrect.
In CpuFeaturesImpliedByCompiler(),
#ifdef __arm__
// If the compiler is allowed to use VFP then we can use VFP too in our
code
// generation even when generating snapshots. This won't work for cross
// compilation. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6.
#if defined(__VFP_FP__) && !defined(__SOFTFP__)
answer |= 1u << VFP3 | 1u << ARMv7;
#endif // defined(__VFP_FP__) && !defined(__SOFTFP__)
#endif // def __arm__
The above doesn't seem right:
__VFP_FP__ only determines the floating point format being used. So, this
gets turned on simply by -mfpu=vfp (-mfpu=maverick for example turns it
off). __SOFTFP__ is set for -mfloat-abi=soft (and not for softfp). Given
the above, one cannot derive that one can use VFP3.
The actual problem is seen when compiling for ARMv6. __VFP_FP__ is defined
and __SOFTFP__ is not (since we use softfp calling convention). V8 ends up
thinking it's ARMv7 and VFP3 capable.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev