@@ -1971,6 +1971,12 @@ ARM Target supports options suitable for accessing the Q-bit manipulation
intrinsics from @code{arm_acle.h}.
Some multilibs may be incompatible with these options.
+@item arm_dsp_ok
+@anchor{arm_dsp_ok}
+ARM Target supports options suitable for accessing the DSP intrinsics
+from @code{arm_acle.h}.
+Some multilibs may be incompatible with these options.
+
@item arm_softfp_ok
@anchor{arm_softfp_ok}
ARM target supports the @code{-mfloat-abi=softfp} option.
@@ -2613,6 +2619,11 @@ Add options to enable generation of the @code{VFMAL} and @code{VFMSL}
instructions, if this is supported by the target; see the
@ref{arm_fp16fml_neon_ok} effective target keyword.
+@item arm_dsp
+Add options for ARM DSP intrinsics support, if this is supported by
+the target; see the @ref{arm_dsp_ok,,arm_dsp_ok effective target
+keyword}.
+
@item bind_pic_locally
Add the target-specific flags needed to enable functions to bind
locally when using pic/PIC passes in the testsuite.
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-require-effective-target arm_qbit_ok } */
-/* { dg-add-options arm_qbit } */
+/* { dg-require-effective-target arm_dsp_ok } */
+/* { dg-add-options arm_dsp } */
#include <arm_acle.h>
@@ -3994,6 +3994,46 @@ proc add_options_for_arm_qbit { flags } {
return "$flags $et_arm_qbit_flags"
}
+# Return 1 if this is an ARM target supporting the DSP intrinsics from
+# arm_acle.h. Some multilibs may be incompatible with these options.
+# Also set et_arm_dsp_flags to the best options to add.
+# arm_acle.h includes stdint.h which can cause trouble with incompatible
+# -mfloat-abi= options.
+# check_effective_target_arm_dsp also exists, which checks the current
+# multilib, without trying other options.
+
+proc check_effective_target_arm_dsp_ok_nocache { } {
+ global et_arm_dsp_flags
+ set et_arm_dsp_flags ""
+ foreach flags {"" "-march=armv5te" "-march=armv5te -mfloat-abi=softfp" "-march=armv5te -mfloat-abi=hard"} {
+ if { [check_no_compiler_messages_nocache et_arm_dsp_ok object {
+ #include <arm_acle.h>
+ int dummy;
+ #ifndef __ARM_FEATURE_DSP
+ #error not DSP
+ #endif
+ } "$flags"] } {
+ set et_arm_dsp_flags $flags
+ return 1
+ }
+ }
+
+ return 0
+}
+
+proc check_effective_target_arm_dsp_ok { } {
+ return [check_cached_effective_target et_arm_dsp_flags \
+ check_effective_target_arm_dsp_ok_nocache]
+}
+
+proc add_options_for_arm_dsp { flags } {
+ if { ! [check_effective_target_arm_dsp_ok] } {
+ return "$flags"
+ }
+ global et_arm_dsp_flags
+ return "$flags $et_arm_dsp_flags"
+}
+
# Return 1 if this is an ARM target supporting -mfpu=neon without any
# -mfloat-abi= option. Useful in tests where add_options is not
# supported (such as lto tests).