aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-29 16:43:48 -0400
committerMike Frysinger <vapier@gentoo.org>2015-03-29 16:45:49 -0400
commit191ec03314b005b8189ecea7296f2f6cad534d09 (patch)
tree6f349c9e22f91966fb7e8dbbc84acb9cdeb18fe6 /sim/testsuite
parent744b9a190b9b5b83d83f43d35b6ab6d20f49af8f (diff)
downloadgdb-191ec03314b005b8189ecea7296f2f6cad534d09.zip
gdb-191ec03314b005b8189ecea7296f2f6cad534d09.tar.gz
gdb-191ec03314b005b8189ecea7296f2f6cad534d09.tar.bz2
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.
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/sim/microblaze/ChangeLog3
-rw-r--r--sim/testsuite/sim/microblaze/allinsn.exp15
-rw-r--r--sim/testsuite/sim/microblaze/pass.s8
-rw-r--r--sim/testsuite/sim/microblaze/testutils.inc29
4 files changed, 55 insertions, 0 deletions
diff --git a/sim/testsuite/sim/microblaze/ChangeLog b/sim/testsuite/sim/microblaze/ChangeLog
new file mode 100644
index 0000000..2aa1f2c
--- /dev/null
+++ b/sim/testsuite/sim/microblaze/ChangeLog
@@ -0,0 +1,3 @@
+2015-03-29 Mike Frysinger <vapier@gentoo.org>
+
+ * pass.s, allinsn.exp, testutils.inc: New files.
diff --git a/sim/testsuite/sim/microblaze/allinsn.exp b/sim/testsuite/sim/microblaze/allinsn.exp
new file mode 100644
index 0000000..f756914
--- /dev/null
+++ b/sim/testsuite/sim/microblaze/allinsn.exp
@@ -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
+ }
+}
diff --git a/sim/testsuite/sim/microblaze/pass.s b/sim/testsuite/sim/microblaze/pass.s
new file mode 100644
index 0000000..93ed924
--- /dev/null
+++ b/sim/testsuite/sim/microblaze/pass.s
@@ -0,0 +1,8 @@
+# check that the sim doesn't die immediately.
+# mach: microblaze
+# output:
+
+.include "testutils.inc"
+
+ start
+ pass
diff --git a/sim/testsuite/sim/microblaze/testutils.inc b/sim/testsuite/sim/microblaze/testutils.inc
new file mode 100644
index 0000000..158a3c5
--- /dev/null
+++ b/sim/testsuite/sim/microblaze/testutils.inc
@@ -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