This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] Add gdb.asm/frv.inc for FR-V assembly tests
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 8 Dec 2003 15:35:24 -0700
- Subject: [RFC] Add gdb.asm/frv.inc for FR-V assembly tests
Any comments on the following changes? If not, I'll commit towards
the end of the week.
Kevin
* gdb.asm/frv.inc: New file.
* gdb.asm/asm-source.exp: Add frv-*-* as a supported target.
Index: ./testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.45
diff -u -p -r1.45 asm-source.exp
--- ./testsuite/gdb.asm/asm-source.exp 29 Nov 2003 13:55:17 -0000 1.45
+++ ./testsuite/gdb.asm/asm-source.exp 8 Dec 2003 22:19:09 -0000
@@ -52,6 +52,9 @@ switch -glob -- [istarget] {
"d10v-*-*" {
set asm-arch d10v
}
+ "frv-*-*" {
+ set asm-arch frv
+ }
"s390-*-*" {
set asm-arch s390
}
Index: ./testsuite/gdb.asm/frv.inc
===================================================================
RCS file: ./testsuite/gdb.asm/frv.inc
diff -N ./testsuite/gdb.asm/frv.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./testsuite/gdb.asm/frv.inc 8 Dec 2003 22:19:09 -0000
@@ -0,0 +1,54 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ addi sp,#-16,sp
+ sti fp, @(sp,0)
+ mov sp, fp
+ movsg lr, gr5
+ sti gr5, @(fp,8)
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldi @(fp,8), gr5
+ ld @(fp,gr0), fp
+ addi sp,#16,sp
+ jmpl @(gr5,gr0)
+ .endm
+
+ .macro gdbasm_call subr
+ call \subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ comment "Don't know how to exit, but this will certainly halt..."
+ ldi @(gr0,0), gr5
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ call .Lcall
+.Lcall: movsg lr, gr4
+ sethi #gprelhi(.Lcall), gr5
+ setlo #gprello(.Lcall), gr5
+ sub gr4, gr5, gr16
+
+ sethi #gprelhi(_stack), sp
+ setlo #gprello(_stack), sp
+ setlos #0, fp
+ add sp, gr16, sp
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm