--- /dev/null
+#
+# Driver for D10V assembler testsuite
+#
+proc run_list_test { name opts } {
+ global srcdir subdir
+ set testname "D10V $name"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if {[regexp_diff "dump.out" "${file}.l"] } {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}
+
+if {[istarget d10v-*-*]} {
+ run_dump_test "inst"
+}
--- /dev/null
+#objdump: -dr
+#name: D10V basic instruction test output
+#as:
+
+.*: +file format elf32-d10v
+
+Disassembly of section .text:
+
+00000000 <start>:
+ 0: a9 04 c2 29 sac r0, a0 <- sachi r1, a0
+ 4: a9 06 c2 2d rac r0, a0, -0x2 <- rachi r1, a0, -0x2
+ 8: 2f 00 32 26 nop || slae a0, r3
+ c: f2 11 08 00 ld r1, @0x800
+ 10: f3 01 08 00 ld2w r0, @0x800
+ 14: f7 01 08 00 st2w r0, @0x800
+ 18: f6 11 08 00 st r1, @0x800
+ 1c: 6f 00 5e 00 nop -> nop
+ 20: 6f 00 5e 00 nop -> nop
+ 24: 2f 00 5e 00 nop || nop
+ 28: af 00 5e 00 nop <- nop
+ 2c: 23 11 de 00 not r1 || nop
+ 30: 63 21 de 00 not r2 -> nop
--- /dev/null
+# test all instructions. FIXME: many instructions missing.
+
+start:
+ sachi r1, a0
+ sac r0, a0
+ #
+ # disassembler test. sachi&sac should not
+ # be confused with rachi&rac
+ #
+ rachi r1, a0, -0x2
+ rac r0, a0, -0x2
+ slae a0, r3
+ ld r1, @0x0800
+ ld2w r0, @0x0800
+ st2w r0, @0x0800
+ st r1, @0x0800
+
+# VLIW syntax test
+ nop
+ nop
+ nop -> nop
+ nop || nop
+ nop <- nop
+
+# try changing sections
+ not r1
+ .section .foo
+ add3 r10,r12,6
+ .text
+ not r2
+ nop