sim: microblaze: start a testsuite
Since the sim doesn't have any debug support in it, we can only exit cleanly. But this is still better than nothing. Change the default microblaze sim to not dump the debug load output when running. No other does this, and it breaks the testsuite.
This commit is contained in:
parent
744b9a190b
commit
191ec03314
6 changed files with 60 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-03-29 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Set verbose to 0 when calling sim_load_file.
|
||||
|
||||
2015-03-29 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure.ac: Call SIM_AC_OPTION_ENDIAN, SIM_AC_OPTION_ALIGNMENT,
|
||||
|
|
|
@ -820,7 +820,7 @@ sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
|
|||
/* from sh -- dac */
|
||||
prog_bfd = sim_load_file (sd, myname, callback, prog, abfd,
|
||||
/* sim_kind == SIM_OPEN_DEBUG, */
|
||||
1,
|
||||
0,
|
||||
0, sim_write);
|
||||
if (prog_bfd == NULL)
|
||||
return SIM_RC_FAIL;
|
||||
|
|
3
sim/testsuite/sim/microblaze/ChangeLog
Normal file
3
sim/testsuite/sim/microblaze/ChangeLog
Normal file
|
@ -0,0 +1,3 @@
|
|||
2015-03-29 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* pass.s, allinsn.exp, testutils.inc: New files.
|
15
sim/testsuite/sim/microblaze/allinsn.exp
Normal file
15
sim/testsuite/sim/microblaze/allinsn.exp
Normal file
|
@ -0,0 +1,15 @@
|
|||
# microblaze simulator testsuite
|
||||
|
||||
if [istarget microblaze-*] {
|
||||
# all machines
|
||||
set all_machs "microblaze"
|
||||
|
||||
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
|
||||
}
|
||||
}
|
8
sim/testsuite/sim/microblaze/pass.s
Normal file
8
sim/testsuite/sim/microblaze/pass.s
Normal file
|
@ -0,0 +1,8 @@
|
|||
# check that the sim doesn't die immediately.
|
||||
# mach: microblaze
|
||||
# output:
|
||||
|
||||
.include "testutils.inc"
|
||||
|
||||
start
|
||||
pass
|
29
sim/testsuite/sim/microblaze/testutils.inc
Normal file
29
sim/testsuite/sim/microblaze/testutils.inc
Normal file
|
@ -0,0 +1,29 @@
|
|||
# MACRO: exit
|
||||
.macro exit nr
|
||||
addi r3, r0, \nr;
|
||||
bri 0;
|
||||
.endm
|
||||
|
||||
# MACRO: pass
|
||||
# Write 'pass' to stdout and quit
|
||||
.macro pass
|
||||
exit 0
|
||||
.data
|
||||
1: .asciz "pass\n"
|
||||
.endm
|
||||
|
||||
# MACRO: fail
|
||||
# Write 'fail' to stdout and quit
|
||||
.macro fail
|
||||
exit 1
|
||||
.data
|
||||
1: .asciz "fail\n"
|
||||
.endm
|
||||
|
||||
# MACRO: start
|
||||
# All assembler tests should start with a call to "start"
|
||||
.macro start
|
||||
.text
|
||||
.global _start
|
||||
_start:
|
||||
.endm
|
Loading…
Reference in a new issue