Browse files

Fix hardfloat detection

gcc has a builtin define to denote hard abi when in use, e.g. when
using -mfloat-abi=hard it will define __ARM_PCS_VFP to 1 and therefore
we should check that to determine which calling convention is in use
and not __VFP_FP__ which merely indicates presence of VFP unit

The fix has been provided by Khem Raj <>
  • Loading branch information...
1 parent 18b94ea commit a2a86b2883057ff62333f56b4073d5110533af99 @otavio otavio committed May 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 deps/v8/src/
2 deps/v8/src/
@@ -167,7 +167,7 @@ bool OS::ArmCpuHasFeature(CpuFeature feature) {
// calling this will return 1.0 and otherwise 0.0.
static void ArmUsingHardFloatHelper() {
asm("mov r0, #0":::"r0");
-#if defined(__VFP_FP__) && !defined(__SOFTFP__)
+#if defined(__ARM_PCS_VFP) && !defined(__SOFTFP__)
// Load 0x3ff00000 into r1 using instructions available in both ARM
// and Thumb mode.
asm("mov r1, #3":::"r1");

1 comment on commit a2a86b2



I believe this commit is incorrect. Please see the v8 issue at
for details.

Please follow up on this issue if the v8 patch (to be uploaded) does not fix your problems.


Please sign in to comment.