Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Kei Sakamoto" <sakamoto.kei@renesas.com>
To: <gdb-patches@sources.redhat.com>
Subject: [RFA/testcase] fix compile error of asm-source.exp for m32r-linux
Date: Fri, 01 Oct 2004 09:23:00 -0000	[thread overview]
Message-ID: <01cf01c4a798$54a36b00$5169910a@E5A02646> (raw)

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

The attached fixes the compiler error of asm-source.exp
for m32r-linux target.

In case of m32r-elf target, asm-source test needs to set
stack pointer register. But in m32r-linux target, Linux
kernel sets it and the asm-source test should not change
its value.

OK to commit?

2004-10-01    Kei Sakamoto  <sakamoto.kei@renesas.com>

        * gdb.asm/asm-source.exp: Add m32r-linux target.
        * gdb.asm/m32r-linux.inc: New file.

[-- Attachment #2: asm.patch --]
[-- Type: application/octet-stream, Size: 1428 bytes --]

Index: gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.52
diff -u -r1.52 asm-source.exp
--- gdb.asm/asm-source.exp	30 Jul 2004 22:09:01 -0000	1.52
+++ gdb.asm/asm-source.exp	1 Oct 2004 08:41:53 -0000
@@ -71,6 +71,9 @@
     "i\[3456\]86-*-*" {
         set asm-arch i386
     }
+    "m32r*-linux*" {
+        set asm-arch m32r-linux
+    }
     "m32r*-*" {
         set asm-arch m32r
         append link-flags "--whole-archive -lgloss --no-whole-archive"
Index: gdb.asm/m32r-linux.inc
===================================================================
RCS file: gdb.asm/m32r-linux.inc
diff -N gdb.asm/m32r-linux.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb.asm/m32r-linux.inc	1 Oct 2004 08:41:53 -0000
@@ -0,0 +1,34 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	push fp -> push lr
+	addi sp,#-4 -> mv fp,sp
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	addi sp,#4 -> pop lr
+	pop fp -> jmp lr
+	.endm
+
+	.macro gdbasm_call subr
+	bl	\subr
+	.endm
+
+	.macro gdbasm_several_nops
+	nop
+	nop
+	nop
+	nop
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	ldi r0,#1 -> ldi r1,#0
+	ldi r2,#0 -> ldi r3,#0
+	trap #0 -> nop
+	.endm
+
+	comment "crt0 startup"
+	.macro gdbasm_startup
+	ldi fp,#0
+	.endm

             reply	other threads:[~2004-10-01  9:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01  9:23 Kei Sakamoto [this message]
2004-10-04 21:35 ` Daniel Jacobowitz
2004-10-05  4:15   ` Kei Sakamoto

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='01cf01c4a798$54a36b00$5169910a@E5A02646' \
    --to=sakamoto.kei@renesas.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