From: "Maciej W. Rozycki" <macro@mips.com>
To: gdb-patches@sourceware.org
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: mips-tdep.c: Use is_mips16_addr() to test for the MIPS16 mode
Date: Fri, 20 Jul 2007 13:50:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.61.0707201347510.14419@perivale.mips.com> (raw)
Hello,
We have a function to check whether an address of instruction implies the
MIPS16 mode or not. However mips_next_pc() checks that directly. Here is
a fix. No regressions for mipsisa32-sde-elf, with mips-sim-sde32/-EB and
mips-sim-sde32/-mips16/-EB.
2007-07-20 Maciej W. Rozycki <macro@mips.com>
* mips-tdep.c (mips_next_pc): Use is_mips16_addr() instead of
a direct test.
OK to apply?
Maciej
gdb-mips_next_pc.diff
Index: binutils-quilt/src/gdb/mips-tdep.c
===================================================================
--- binutils-quilt.orig/src/gdb/mips-tdep.c 2007-07-19 18:15:07.000000000 +0100
+++ binutils-quilt/src/gdb/mips-tdep.c 2007-07-19 18:27:51.000000000 +0100
@@ -1437,11 +1437,11 @@
target monitor or stub is not developed enough to do a single_step.
It works by decoding the current instruction and predicting where a
branch will go. This isnt hard because all the data is available.
- The MIPS32 and MIPS16 variants are quite different */
+ The MIPS32 and MIPS16 variants are quite different. */
static CORE_ADDR
mips_next_pc (struct frame_info *frame, CORE_ADDR pc)
{
- if (pc & 0x01)
+ if (is_mips16_addr (pc))
return mips16_next_pc (frame, pc);
else
return mips32_next_pc (frame, pc);
next reply other threads:[~2007-07-20 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 13:50 Maciej W. Rozycki [this message]
2007-07-20 15:30 ` Daniel Jacobowitz
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=Pine.LNX.4.61.0707201347510.14419@perivale.mips.com \
--to=macro@mips.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@linux-mips.org \
/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