# best options to add.
proc check_effective_target_arm_neon_ok_nocache { } {
+ if { ![istarget arm*-*-*] } {
+ return 0
+ }
global et_arm_neon_flags
set et_arm_neon_flags ""
- if { [check_effective_target_arm32] } {
- foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -mcpu=unset -march=armv7-a" "-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard -mcpu=unset -march=armv7-a"} {
- if { [check_no_compiler_messages_nocache arm_neon_ok object {
- #include <arm_neon.h>
- int dummy;
- #ifndef __ARM_NEON__
- #error not NEON
- #endif
- /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
- configured for -mcpu=arm926ej-s, for example. */
- #if __ARM_ARCH < 7 || __ARM_ARCH_PROFILE == 'M'
- #error Architecture does not support NEON.
- #endif
- } "$flags"] } {
- set et_arm_neon_flags $flags
- return 1
- }
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -mcpu=unset -march=armv7-a" "-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard -mcpu=unset -march=armv7-a"} {
+ if { [check_no_compiler_messages_nocache arm_neon_ok object {
+ #include <arm_neon.h>
+ int dummy;
+ #ifndef __ARM_NEON__
+ #error not NEON
+ #endif
+ /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
+ configured for -mcpu=arm926ej-s, for example. */
+ #if __ARM_ARCH < 7 || __ARM_ARCH_PROFILE == 'M'
+ #error Architecture does not support NEON.
+ #endif
+ } "$flags"] } {
+ set et_arm_neon_flags $flags
+ return 1
}
}
global et_arm_neon_fp16_flags
global et_arm_neon_flags
set et_arm_neon_fp16_flags ""
- if { [check_effective_target_arm32]
- && [check_effective_target_arm_neon_ok] } {
+ if { [check_effective_target_arm_neon_ok] } {
foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp16"
"-mfpu=neon-fp16 -mfloat-abi=softfp"
"-mfp16-format=ieee"
global et_arm_neon_softfp_fp16_flags
global et_arm_neon_flags
set et_arm_neon_softfp_fp16_flags ""
- if { [check_effective_target_arm32]
- && [check_effective_target_arm_neon_ok] } {
+ if { [check_effective_target_arm_neon_ok] } {
foreach flags {"-mfpu=neon-fp16 -mfloat-abi=softfp"
"-mfpu=neon-fp16 -mfloat-abi=softfp -mfp16-format=ieee"} {
if { [check_no_compiler_messages_nocache arm_neon_softfp_fp16_ok object {
proc check_effective_target_arm_v8_neon_ok_nocache { } {
global et_arm_v8_neon_flags
set et_arm_v8_neon_flags ""
- if { [check_effective_target_arm32] } {
- foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp-armv8" "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"} {
- if { [check_no_compiler_messages_nocache arm_v8_neon_ok object {
- #if __ARM_ARCH < 8
- #error not armv8 or later
- #endif
- #include "arm_neon.h"
- void
- foo ()
- {
- __asm__ volatile ("vrintn.f32 q0, q0");
- }
- } "$flags -mcpu=unset -march=armv8-a"] } {
- set et_arm_v8_neon_flags $flags
- return 1
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp-armv8" "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"} {
+ if { [check_no_compiler_messages_nocache arm_v8_neon_ok object {
+ #if __ARM_ARCH < 8
+ #error not armv8 or later
+ #endif
+ #include "arm_neon.h"
+ void
+ foo ()
+ {
+ __asm__ volatile ("vrintn.f32 q0, q0");
}
+ } "$flags -mcpu=unset -march=armv8-a"] } {
+ set et_arm_v8_neon_flags $flags
+ return 1
}
}
global et_arm_neonv2_flags
global et_arm_neon_flags
set et_arm_neonv2_flags ""
- if { [check_effective_target_arm32]
- && [check_effective_target_arm_neon_ok] } {
+ if { [check_effective_target_arm_neon_ok] } {
foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-vfpv4" "-mfpu=neon-vfpv4 -mfloat-abi=softfp"} {
if { [check_no_compiler_messages_nocache arm_neonv2_ok object {
#include "arm_neon.h"
expr { [istarget powerpc*-*-*]
|| [check_effective_target_x86]
|| [istarget aarch64*-*-*]
- || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
+ || ([check_effective_target_arm_neon_ok]
&& [check_effective_target_arm_little_endian])
|| ([istarget mips*-*-*]
&& [et-is-effective-target mips_msa])
|| [istarget aarch64*-*-*]
|| ([istarget mips*-*-*]
&& [et-is-effective-target mips_msa])
- || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
+ || ([check_effective_target_arm_neon_ok]
&& [check_effective_target_arm_little_endian])
|| ([istarget s390*-*-*]
&& [check_effective_target_s390_vx])
|| [check_effective_target_x86]
|| ([istarget mips*-*-*]
&& [et-is-effective-target mips_msa])
- || ([istarget arm*-*-*]
- && [check_effective_target_arm_neon_ok])
+ || [check_effective_target_arm_neon_ok]
|| ([istarget s390*-*-*]
&& [check_effective_target_s390_vx])
|| [istarget amdgcn-*-*]
expr { [check_effective_target_x86]
|| [istarget aarch64*-*-*]
|| [istarget powerpc*-*-*]
- || ([istarget arm*-*-*]
- && [check_effective_target_arm_neon_ok])
+ || [check_effective_target_arm_neon_ok]
|| ([istarget mips*-*-*]
&& [et-is-effective-target mips_msa])
|| ([istarget s390*-*-*]
lappend result [aarch64_sve_bits]
}
lappend result 128 64
- } elseif { [istarget arm*-*-*]
- && [check_effective_target_arm_neon_ok] } {
+ } elseif { [check_effective_target_arm_neon_ok] } {
lappend result 128 64
} elseif { [check_effective_target_x86] } {
if { [check_avx_available] && ![check_prefer_avx128] } {