* mips-tdep.c: Use is_mips16_addr() to test for the MIPS16 mode
@ 2007-07-20 13:50 Maciej W. Rozycki
2007-07-20 15:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2007-07-20 13:50 UTC (permalink / raw)
To: gdb-patches; +Cc: Maciej W. Rozycki
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);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: mips-tdep.c: Use is_mips16_addr() to test for the MIPS16 mode
2007-07-20 13:50 mips-tdep.c: Use is_mips16_addr() to test for the MIPS16 mode Maciej W. Rozycki
@ 2007-07-20 15:30 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-07-20 15:30 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: gdb-patches, Maciej W. Rozycki
On Fri, Jul 20, 2007 at 01:53:49PM +0100, Maciej W. Rozycki wrote:
> 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?
OK.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-20 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 13:50 mips-tdep.c: Use is_mips16_addr() to test for the MIPS16 mode Maciej W. Rozycki
2007-07-20 15:30 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox