sim: testsuite: drop most specific istarget checks

We'll rely on the toolchain probing to determine whether each arch's
tests can be run rather the current configure target.  This allows
testing all of the ports in a multitarget configuration.

For now, we don't reformat the files entirely to make it easier to
review, and in case we need to make adjustments.  Once this feels
like it's stable, we can flatten the code a bit by removing the if
statement entirely.
This commit is contained in:
Mike Frysinger 2021-11-26 00:18:45 -05:00
parent 804de1faf4
commit b42f20d2ac
42 changed files with 42 additions and 47 deletions

View File

@ -2,7 +2,7 @@
sim_init
if [istarget aarch64*-*] {
if [istarget *] {
# all machines
set all_machs "aarch64"

View File

@ -2,7 +2,7 @@
sim_init
if { [istarget arm*-*-*] } {
if { [istarget *] } {
# all machines
set all_machs "xscale"

View File

@ -2,7 +2,7 @@
sim_init
if { [istarget arm*-*-*] } {
if { [istarget *] } {
# all machines
set all_machs "xscale"

View File

@ -2,7 +2,7 @@
sim_init
if { [istarget arm*-*-*] } {
if { [istarget *] } {
# all machines
set all_machs "arm7tdmi"

View File

@ -2,7 +2,7 @@
sim_init
if { [istarget arm*-*-*] } {
if { [istarget *] } {
# all machines
set all_machs "arm7tdmi"

View File

@ -2,7 +2,7 @@
sim_init
if { [istarget arm*-*-*] } {
if { [istarget *] } {
# all machines
set all_machs "xscale"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget avr-*] {
if [istarget *] {
# all machines
set all_machs "avr"

View File

@ -6,7 +6,7 @@ global CFLAGS_FOR_TARGET_init
set CFLAGS_FOR_TARGET_init "-mcpu=bf537"
sim_init
if [istarget bfin-*-elf] {
if [istarget *] {
# all machines
set all_machs "bfin"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget bpf-unknown-none] {
if [istarget *] {
# all machines
set all_machs "bpf"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget cr16*-*-*] {
if [istarget *] {
# all machines
set all_machs "cr16"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget cr16*-*-*] {
if [istarget *] {
# all machines
set all_machs "cr16"

View File

@ -17,7 +17,7 @@
sim_init
if [istarget cris*-*-*] {
if [istarget *] {
global ASFLAGS_FOR_TARGET
# All machines we test and the corresponding assembler option. Needs
# update if we build the simulator for crisv0 crisv3 and crisv8 too.

View File

@ -17,10 +17,6 @@
sim_init
if ![istarget cris*-*-*] {
return
}
set CFLAGS_FOR_TARGET "-O2"
if [istarget cris-*-*] {
set mach "crisv10"
@ -28,7 +24,7 @@ if [istarget cris-*-*] {
set mach "crisv32"
}
if [istarget cris*-*-elf] {
if [istarget *] {
append CFLAGS_FOR_TARGET " -sim"
}

View File

@ -116,7 +116,7 @@ proc slurp_rv { file } {
# The main test loop.
if [istarget cris*-*-*] {
if [istarget *] {
global ASFLAGS_FOR_TARGET
global LDFLAGS_FOR_TARGET
global SIMFLAGS_FOR_TARGET

View File

@ -2,7 +2,7 @@
sim_init
if [istarget d10v*-*] {
if [istarget *] {
# all machines
set all_machs "d10v"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "frv fr500 fr550 fr400 fr405 fr450"
set cpu_option -mcpu

View File

@ -1,6 +1,6 @@
# mach: frv fr500 fr550
# sim: --memory-region 0xff000000,4 --memory-region 0xfe000000,00404000
# xfail: "crashes with bad write" frv-*
# xfail: "crashes with bad write" *-*
; Exit with return code

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "fr400 fr405 fr450 fr550"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "frv fr500 fr550"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "fr550"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "frv fr500 fr550 fr400"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "frv fr500 fr550 fr400 fr405 fr450"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget frv*-*] {
if [istarget *] {
# all machines
set all_machs "frv fr500 fr550 fr400"
set cpu_option -mcpu

View File

@ -2,7 +2,7 @@
sim_init
if [istarget ft32-*] {
if [istarget *] {
# all machines
set all_machs "ft32"

View File

@ -2,7 +2,7 @@
sim_init
if {[istarget h8300*-*-*] || [istarget h8sx*-*-*]} then {
if {[istarget *]} {
set all_machs "h8300 h8300h h8300s h8sx"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {

View File

@ -2,7 +2,7 @@
sim_init
if [istarget iq2000-*] {
if [istarget *] {
# all machines
set all_machs "iq2000"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget lm32-*] {
if [istarget *] {
# all machines
set all_machs "lm32"

View File

@ -3,7 +3,7 @@
sim_init
if [istarget m32c*-*-*] {
if [istarget *] {
# all machines
set all_machs "m32c"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget m32r*-*-*] {
if [istarget *] {
# all machines
set all_machs "m32r"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget m32r*-*-*] {
if [istarget *] {
# all machines
set all_machs "m32r"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget m68hc11-*] {
if [istarget *] {
# all machines
set all_machs "m68hc11"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget mcore-*] {
if [istarget *] {
# all machines
set all_machs "mcore"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget microblaze-*] {
if [istarget *] {
# all machines
set all_machs "microblaze"

View File

@ -41,8 +41,7 @@ proc run_sim_tests { name requested_machs { requested_micromips_machs "" } } {
run_micromips_test $name $requested_micromips_machs
}
# Only test mips*-*-elf (e.g., no mips*-*-linux)
if {[istarget mips*-*-elf]} {
if {[istarget *]} {
set dspmodels ""
set mdmxmodels ""
set micromipsmodels ""

View File

@ -2,7 +2,7 @@
sim_init
if [istarget mn10300-*] {
if [istarget *] {
# all machines
set all_machs "mn10300"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget moxie-*] {
if [istarget *] {
# all machines
set all_machs "moxie"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget msp430-*] {
if [istarget *] {
# all machines
set all_machs "msp430"

View File

@ -17,7 +17,7 @@
sim_init
if [istarget or1k*-*-*] {
if [istarget *] {
set all_machs "or1k"
global LDFLAGS_FOR_TARGET

View File

@ -20,7 +20,7 @@
sim_init
if [istarget pru-*] {
if [istarget *] {
# all machines
set all_machs "pru"

View File

@ -2,7 +2,7 @@
sim_init
if [istarget riscv*-*] {
if [istarget *] {
# all machines
set all_machs "riscv"

View File

@ -14,7 +14,7 @@ foreach opt $board_variant_list {
}
}
if [istarget sh-*elf] {
if [istarget *] {
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
run_sim_test $src $all_machs
}

View File

@ -2,7 +2,7 @@
sim_init
if [istarget v850*-*] {
if [istarget *] {
# All machines.
# Should add more cpus if the testsuite adds coverage for their insns, but
# at the core level, there's no deviation beyond these two.