Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Add gdb.asm/frv.inc for FR-V assembly tests
Date: Mon, 08 Dec 2003 22:35:00 -0000	[thread overview]
Message-ID: <1031208223524.ZM4932@localhost.localdomain> (raw)

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


             reply	other threads:[~2003-12-08 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-08 22:35 Kevin Buettner [this message]
2003-12-13  1:01 ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1031208223524.ZM4932@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox