Just enough to know the sim isn't totally broken.
+2015-03-28 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+ * configure.tgt (avr*-*-*): Set sim_testsuite=yes.
+
2015-03-28 James Bowman <james.bowman@ftdichip.com>
* configure.tgt: Add FT32 entry.
subdirs="$subdirs avr"
+ sim_testsuite=yes
;;
bfin-*-*)
;;
avr*-*-*)
SIM_ARCH(avr)
+ sim_testsuite=yes
;;
bfin-*-*)
SIM_ARCH(bfin)
+2015-03-28 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2015-03-28 James Bowman <james.bowman@ftdichip.com>
* configure: Regenerate.
;;
avr*-*-*)
sim_arch=avr
+ sim_testsuite=yes
;;
bfin-*-*)
sim_arch=bfin
--- /dev/null
+2015-03-28 Mike Frysinger <vapier@gentoo.org>
+
+ * pass.s, allinsn.exp, testutils.inc: New files.
--- /dev/null
+# avr simulator testsuite
+
+if [istarget avr-*] {
+ # all machines
+ set all_machs "avr"
+
+ 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
+ }
+}
--- /dev/null
+# check that the sim doesn't die immediately.
+# mach: avr
+
+.include "testutils.inc"
+
+ start
+ pass
--- /dev/null
+# MACRO: outc
+# Write byte to stdout
+ .macro outc ch
+ ldi r16, \ch
+ out 0x32, r16
+ .endm
+
+# MACRO: exit
+ .macro exit nr
+ ldi r16, \nr
+ out 0x2f, r16
+ .endm
+
+# MACRO: pass
+# Write 'pass' to stdout and quit
+ .macro pass
+ outc 'p'
+ outc 'a'
+ outc 's'
+ outc 's'
+ outc '\n'
+ exit 0
+ .endm
+
+# MACRO: fail
+# Write 'fail' to stdout and quit
+ .macro fail
+ outc 'f'
+ outc 'a'
+ outc 'i'
+ outc 'l'
+ outc '\n'
+ exit 1
+ .endm
+
+# MACRO: start
+# All assembler tests should start with a call to "start"
+ .macro start
+ .text
+__start:
+ .endm