@@ -1560,6 +1560,10 @@ Some multilibs may be incompatible with these options.
ARM target supports @code{-mfpu=fp-armv8 -mfloat-abi=softfp}.
Some multilibs may be incompatible with these options.
+@item arm_v8_neon_ok
+ARM target supports @code{-mfpu=neon-fp-armv8 -mfloat-abi=softfp}.
+Some multilibs may be incompatible with these options.
+
@item arm_prefer_ldrd_strd
ARM target prefers @code{LDRD} and @code{STRD} instructions over
@code{LDM} and @code{STM} instructions.
@@ -2107,6 +2107,22 @@ proc check_effective_target_arm_v8_vfp_ok {} {
}
}
+# Return 1 if this is an ARM target supporting -mfpu=neon-fp-armv8
+# -mfloat-abi=softfp
+proc check_effective_target_arm_v8_neon_ok {} {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_v8_neon_ok object {
+ int foo (void)
+ {
+ __asm__ volatile ("vrintn.f32 q0, q0");
+ return 0;
+ }
+ } "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is an ARM target supporting -mfpu=vfp
# -mfloat-abi=hard. Some multilibs may be incompatible with these
# options.
@@ -2166,6 +2182,13 @@ proc add_options_for_arm_v8_vfp { flags } {
return "$flags -mfpu=fp-armv8 -mfloat-abi=softfp"
}
+proc add_options_for_arm_v8_neon { flags } {
+ if { ! [check_effective_target_arm_v8_neon_ok] } {
+ return "$flags"
+ }
+ return "$flags -mfpu=neon-fp-armv8 -mfloat-abi=softfp"
+}
+
# Add the options needed for NEON. We need either -mfloat-abi=softfp
# or -mfloat-abi=hard, but if one is already specified by the
# multilib, use it. Similarly, if a -mfpu option already enables