endif
endif
endif
-# vfp2=off. Deprecated, use armfpu=
-# vfp3=off. Deprecated, use armfpu=
-ifeq ($(vfp3), off)
- GYPFLAGS += -Darm_fpu=vfp
-endif
# hardfp=on/off. Deprecated, use armfloatabi
ifeq ($(hardfp),on)
GYPFLAGS += -Darm_float_abi=hard
GYPFLAGS += -Darm_float_abi=softfp
endif
endif
-# armneon=on/off
-ifeq ($(armneon), on)
- GYPFLAGS += -Darm_neon=1
-endif
# fpu: armfpu=xxx
# xxx: vfp, vfpv3-d16, vfpv3, neon.
ifeq ($(armfpu),)
-ifneq ($(vfp3), off)
GYPFLAGS += -Darm_fpu=default
-endif
else
GYPFLAGS += -Darm_fpu=$(armfpu)
endif
# armtest=on
# With this flag set, by default v8 will only use features implied
# by the compiler (no probe). This is done by modifying the default
-# values of enable_armv7, enable_vfp2, enable_vfp3 and enable_32dregs.
+# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon.
# Modifying these flags when launching v8 will enable the probing for
# the specified values.
# When using the simulator, this flag is implied.
],
# Default ARM variable settings.
'arm_version%': 'default',
- 'arm_neon%': 0,
'arm_fpu%': 'vfpv3',
'arm_float_abi%': 'default',
'arm_thumb': 'default',
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_neon==1', {
- 'cflags': ['-mfpu=neon',],
- },
- {
- 'conditions': [
- [ 'arm_fpu!="default"', {
- 'cflags': ['-mfpu=<(arm_fpu)',],
- }],
- ],
+ [ 'arm_fpu!="default"', {
+ 'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
}],
'CAN_USE_VFP32DREGS',
],
}],
- [ 'arm_fpu=="neon" or arm_neon==1', {
+ [ 'arm_fpu=="neon"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
'CAN_USE_VFP32DREGS',
+ 'CAN_USE_NEON',
],
}],
],
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_neon==1', {
- 'cflags': ['-mfpu=neon',],
- },
- {
- 'conditions': [
- [ 'arm_fpu!="default"', {
- 'cflags': ['-mfpu=<(arm_fpu)',],
- }],
- ],
+ [ 'arm_fpu!="default"', {
+ 'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
}],
'defines': [
'ARM_TEST',
],
+ 'conditions': [
+ [ 'arm_fpu=="vfpv3-d16"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ ],
+ }],
+ [ 'arm_fpu=="vfpv3"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ ],
+ }],
+ [ 'arm_fpu=="neon"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ 'CAN_USE_NEON',
+ ],
+ }],
+ ],
}],
],
}, {
[ 'arm_fpu=="default"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ 'CAN_USE_NEON',
],
}],
[ 'arm_fpu=="vfpv3-d16"', {
'CAN_USE_VFP32DREGS',
],
}],
- [ 'arm_fpu=="neon" or arm_neon==1', {
+ [ 'arm_fpu=="neon"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
'CAN_USE_VFP32DREGS',
+ 'CAN_USE_NEON',
],
}],
],
answer |= 1u << VFP32DREGS;
}
#endif // CAN_USE_VFP32DREGS
+#ifdef CAN_USE_NEON
+ if (FLAG_enable_neon) {
+ answer |= 1u << NEON;
+ }
+#endif // CAN_USE_VFP32DREGS
if ((answer & (1u << ARMv7)) && FLAG_enable_unaligned_accesses) {
answer |= 1u << UNALIGNED_ACCESSES;
}
}
#ifndef __arm__
- // For the simulator=arm build, use VFP when FLAG_enable_vfp3 is
- // enabled. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6.
- if (FLAG_enable_vfp3) {
- supported_ |=
- static_cast<uint64_t>(1) << VFP3 |
- static_cast<uint64_t>(1) << ARMv7;
- }
- if (FLAG_enable_neon) {
- supported_ |= 1u << NEON;
- }
// For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled
if (FLAG_enable_armv7) {
supported_ |= static_cast<uint64_t>(1) << ARMv7;
+ if (FLAG_enable_vfp3) {
+ supported_ |= static_cast<uint64_t>(1) << VFP3;
+ }
+ if (FLAG_enable_neon) {
+ supported_ |= 1u << NEON;
+ supported_ |= static_cast<uint64_t>(1) << VFP32DREGS;
+ }
+ if (FLAG_enable_sudiv) {
+ supported_ |= static_cast<uint64_t>(1) << SUDIV;
+ }
+ if (FLAG_enable_movw_movt) {
+ supported_ |= static_cast<uint64_t>(1) << MOVW_MOVT_IMMEDIATE_LOADS;
+ }
+ if (FLAG_enable_32dregs) {
+ supported_ |= static_cast<uint64_t>(1) << VFP32DREGS;
+ }
}
-
- if (FLAG_enable_sudiv) {
- supported_ |= static_cast<uint64_t>(1) << SUDIV;
- }
-
- if (FLAG_enable_movw_movt) {
- supported_ |= static_cast<uint64_t>(1) << MOVW_MOVT_IMMEDIATE_LOADS;
- }
-
- if (FLAG_enable_32dregs) {
- supported_ |= static_cast<uint64_t>(1) << VFP32DREGS;
- }
-
if (FLAG_enable_unaligned_accesses) {
supported_ |= static_cast<uint64_t>(1) << UNALIGNED_ACCESSES;
}
#else
# define ENABLE_32DREGS_DEFAULT false
#endif
+#if (defined CAN_USE_NEON) || !(defined ARM_TEST)
+# define ENABLE_NEON_DEFAULT true
+#else
+# define ENABLE_NEON_DEFAULT false
+#endif
#define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
#define DEFINE_maybe_bool(nam, cmt) FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, \
"enable use of VFP3 instructions if available")
DEFINE_bool(enable_armv7, ENABLE_ARMV7_DEFAULT,
"enable use of ARMv7 instructions if available (ARM only)")
-DEFINE_bool(enable_neon, true,
+DEFINE_bool(enable_neon, ENABLE_NEON_DEFAULT,
"enable use of NEON instructions if available (ARM only)")
DEFINE_bool(enable_sudiv, true,
"enable use of SDIV and UDIV instructions if available (ARM only)")