aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-04-29 14:22:28 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-04-29 14:22:28 +0000
commit547b869acde1ba964366d966c020340b243b1080 (patch)
tree7944140a4ef272c59537c5e6b2840752edd1f5a0 /gdb
parent862ba188efc0d2750d563b4cf95b7d654b1d128b (diff)
downloadgdb-547b869acde1ba964366d966c020340b243b1080.zip
gdb-547b869acde1ba964366d966c020340b243b1080.tar.gz
gdb-547b869acde1ba964366d966c020340b243b1080.tar.bz2
* gdb.asm/asm-source.exp: Add h8300 to supported targets.
* gdb.asm/h8300.inc: New file.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp4
-rw-r--r--gdb/testsuite/gdb.asm/h8300.inc50
3 files changed, 59 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 308a08c..2724208 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.asm/asm-source.exp: Add h8300 to supported targets.
+ * gdb.asm/h8300.inc: New file.
+
2005-04-28 Paul Gilliam <pgilliam@us.ibm.com>
* gdb.base/shlib-call.exp: Change to use new shared library
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 6f4821e..2477e24 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -130,6 +130,10 @@ switch -glob -- [istarget] {
set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
set debug-flags "-gdwarf-2"
}
+ "h83*-*" {
+ set asm-arch h8300
+ set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ }
}
if { "${asm-arch}" == "" } {
diff --git a/gdb/testsuite/gdb.asm/h8300.inc b/gdb/testsuite/gdb.asm/h8300.inc
new file mode 100644
index 0000000..47d2135
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/h8300.inc
@@ -0,0 +1,50 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ mov.w r6,@-r7
+ mov.w r7,r6
+ subs #2,r7
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ adds #2,r7
+ mov.w @r7+,r6
+ rts
+ .endm
+
+ .macro gdbasm_call subr
+ jsr @\subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ mov.w #0xdead,r1
+ mov.w #0xbeef,r2
+ mov.w #0,r0
+ sleep
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ .section .stack
+_stack: .long 1
+ .section .text
+ .global _start
+_start:
+ mov.w #0,r6
+ mov.w #_stack,sp ; or mov.l #_stack,sp
+ mov.w #_edata,r0
+ mov.w #_end,r1
+ sub.w r2,r2
+.loop: mov.w r2,@r0
+ adds #2,r0
+ cmp r1,r0
+ blo .loop
+ .endm