26da232cbd
Provide a simple example simulator for people porting to new targets to use as a reference. This one has the advantage of being used by people and having a fun program available for it. It doesn't require a special target -- the example simulators can be built for any existing port.
20 lines
434 B
Plaintext
20 lines
434 B
Plaintext
# Example synacor simulator testsuite.
|
|
|
|
if [istarget *] {
|
|
# Used to locate the `run` program.
|
|
global arch
|
|
set arch "example-synacor"
|
|
|
|
# All machines.
|
|
set all_machs "example"
|
|
|
|
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
|
|
# If we're only testing specific files and this isn't one of them,
|
|
# skip it.
|
|
if ![runtest_file_p $runtests $src] {
|
|
continue
|
|
}
|
|
run_sim_test $src $all_machs
|
|
}
|
|
}
|