proc check_effective_target_arm_v8_1a_neon_ok_nocache { } {
global et_arm_v8_1a_neon_flags
set et_arm_v8_1a_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option. Start with the empty set
# since AArch64 only needs the -march setting.
foreach flags {"" "-mfpu=neon-fp-armv8" "-mfloat-abi=softfp" \
"-mfpu=neon-fp-armv8 -mfloat-abi=softfp"} {
- foreach arches { "-mcpu=unset -march=armv8-a+rdma" "-mcpu=unset -march=armv8.1-a" } {
+ foreach arches [list "$cpu_unset -march=armv8-a+rdma" \
+ "$cpu_unset -march=armv8.1-a" ] {
if { [check_no_compiler_messages_nocache arm_v8_1a_neon_ok object {
#if !defined (__ARM_FEATURE_QRDMX)
#error "__ARM_FEATURE_QRDMX not defined"
proc check_effective_target_arm_v8_2a_fp16_scalar_ok_nocache { } {
global et_arm_v8_2a_fp16_scalar_flags
set et_arm_v8_2a_fp16_scalar_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfpu=fp-armv8" "-mfloat-abi=softfp" \
#if !defined (__ARM_FEATURE_FP16_SCALAR_ARITHMETIC)
#error "__ARM_FEATURE_FP16_SCALAR_ARITHMETIC not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.2-a+fp16"] } {
- set et_arm_v8_2a_fp16_scalar_flags "$flags -mcpu=unset -march=armv8.2-a+fp16"
+ } "$flags $cpu_unset -march=armv8.2-a+fp16"] } {
+ set et_arm_v8_2a_fp16_scalar_flags "$flags $cpu_unset -march=armv8.2-a+fp16"
return 1
}
}
proc check_effective_target_arm_v8_2a_fp16_neon_ok_nocache { } {
global et_arm_v8_2a_fp16_neon_flags
set et_arm_v8_2a_fp16_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfpu=neon-fp-armv8" "-mfloat-abi=softfp" \
#if !defined (__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
#error "__ARM_FEATURE_FP16_VECTOR_ARITHMETIC not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.2-a+fp16"] } {
- set et_arm_v8_2a_fp16_neon_flags "$flags -mcpu=unset -march=armv8.2-a+fp16"
+ } "$flags $cpu_unset -march=armv8.2-a+fp16"] } {
+ set et_arm_v8_2a_fp16_neon_flags "$flags $cpu_unset -march=armv8.2-a+fp16"
return 1
}
}
proc check_effective_target_arm_v8_2a_dotprod_neon_ok_nocache { } {
global et_arm_v8_2a_dotprod_neon_flags
set et_arm_v8_2a_dotprod_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" "-mfloat-abi=hard -mfpu=neon-fp-armv8"} {
#if !defined (__ARM_FEATURE_DOTPROD)
#error "__ARM_FEATURE_DOTPROD not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.2-a+dotprod"] } {
- set et_arm_v8_2a_dotprod_neon_flags "$flags -mcpu=unset -march=armv8.2-a+dotprod"
+ } "$flags $cpu_unset -march=armv8.2-a+dotprod"] } {
+ set et_arm_v8_2a_dotprod_neon_flags "$flags $cpu_unset -march=armv8.2-a+dotprod"
return 1
}
}
proc check_effective_target_arm_v8_2a_i8mm_ok_nocache { } {
global et_arm_v8_2a_i8mm_flags
set et_arm_v8_2a_i8mm_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
#if !defined (__ARM_FEATURE_MATMUL_INT8)
#error "__ARM_FEATURE_MATMUL_INT8 not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.2-a+i8mm"] } {
- set et_arm_v8_2a_i8mm_flags "$flags -mcpu=unset -march=armv8.2-a+i8mm"
+ } "$flags $cpu_unset -march=armv8.2-a+i8mm"] } {
+ set et_arm_v8_2a_i8mm_flags "$flags $cpu_unset -march=armv8.2-a+i8mm"
return 1
}
}
proc check_effective_target_arm_v8_2a_bf16_neon_ok_nocache { } {
global et_arm_v8_2a_bf16_neon_flags
set et_arm_v8_2a_bf16_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
if { [check_no_compiler_messages_nocache arm_v8_2a_bf16_neon_ok object {
#include <arm_neon.h>
#if !defined (__ARM_FEATURE_BF16_VECTOR_ARITHMETIC)
#error "__ARM_FEATURE_BF16_VECTOR_ARITHMETIC not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.2-a+bf16"] } {
- set et_arm_v8_2a_bf16_neon_flags "$flags -mcpu=unset -march=armv8.2-a+bf16"
+ } "$flags $cpu_unset -march=armv8.2-a+bf16"] } {
+ set et_arm_v8_2a_bf16_neon_flags "$flags $cpu_unset -march=armv8.2-a+bf16"
return 1
}
}
proc check_effective_target_arm_v8_3a_complex_neon_ok_nocache { } {
global et_arm_v8_3a_complex_neon_flags
set et_arm_v8_3a_complex_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfloat-abi=softfp -mfpu=auto" "-mfloat-abi=hard -mfpu=auto"} {
#if !defined (__ARM_FEATURE_COMPLEX)
#error "__ARM_FEATURE_COMPLEX not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.3-a"] } {
- set et_arm_v8_3a_complex_neon_flags "$flags -mcpu=unset -march=armv8.3-a"
+ } "$flags $cpu_unset -march=armv8.3-a"] } {
+ set et_arm_v8_3a_complex_neon_flags "$flags $cpu_unset -march=armv8.3-a"
return 1;
}
}
proc check_effective_target_arm_v8_3a_fp16_complex_neon_ok_nocache { } {
global et_arm_v8_3a_fp16_complex_neon_flags
set et_arm_v8_3a_fp16_complex_neon_flags ""
+ set cpu_unset ""
if { ![istarget arm*-*-*] && ![istarget aarch64*-*-*] } {
return 0;
}
+ if { [istarget arm*-*-*] } {
+ set cpu_unset "-mcpu=unset"
+ }
+
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfloat-abi=softfp -mfpu=auto" "-mfloat-abi=hard -mfpu=auto"} {
#if !defined (__ARM_FEATURE_COMPLEX)
#error "__ARM_FEATURE_COMPLEX not defined"
#endif
- } "$flags -mcpu=unset -march=armv8.3-a+fp16"] } {
+ } "$flags $cpu_unset -march=armv8.3-a+fp16"] } {
set et_arm_v8_3a_fp16_complex_neon_flags \
- "$flags -mcpu=unset -march=armv8.3-a+fp16"
+ "$flags $cpu_unset -march=armv8.3-a+fp16"
return 1;
}
}