mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-10 18:28:27 +08:00
* h8300-dis.c: Fix formatting.
(bfd_h8_disassemble): Distinguish adds/subs, inc/dec.[wl] correctly.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2000-06-12 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
|
* h8300-dis.c: Fix formatting.
|
||||||
|
(bfd_h8_disassemble): Distinguish adds/subs, inc/dec.[wl]
|
||||||
|
correctly.
|
||||||
|
|
||||||
Fri Jun 9 21:49:02 2000 Denis Chertykov <denisc@overta.ru>
|
Fri Jun 9 21:49:02 2000 Denis Chertykov <denisc@overta.ru>
|
||||||
|
|
||||||
* avr-dis.c (avr_operand): Bugfix for jmp/call address.
|
* avr-dis.c (avr_operand): Bugfix for jmp/call address.
|
||||||
|
@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "dis-asm.h"
|
#include "dis-asm.h"
|
||||||
#include "opintl.h"
|
#include "opintl.h"
|
||||||
|
|
||||||
|
|
||||||
/* Run through the opcodes and sort them into order to make them easy
|
/* Run through the opcodes and sort them into order to make them easy
|
||||||
to disassemble. */
|
to disassemble. */
|
||||||
static void
|
static void
|
||||||
@ -50,7 +49,7 @@ bfd_h8_disassemble_init ()
|
|||||||
/* Just make sure there are an even number of nibbles in it, and
|
/* Just make sure there are an even number of nibbles in it, and
|
||||||
that the count is the same as the length. */
|
that the count is the same as the length. */
|
||||||
for (i = 0; p->data.nib[i] != E; i++)
|
for (i = 0; p->data.nib[i] != E; i++)
|
||||||
/*EMPTY*/;
|
;
|
||||||
|
|
||||||
if (i & 1)
|
if (i & 1)
|
||||||
abort ();
|
abort ();
|
||||||
@ -59,7 +58,6 @@ bfd_h8_disassemble_init ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
bfd_h8_disassemble (addr, info, mode)
|
bfd_h8_disassemble (addr, info, mode)
|
||||||
bfd_vma addr;
|
bfd_vma addr;
|
||||||
@ -153,7 +151,10 @@ bfd_h8_disassemble (addr, info, mode)
|
|||||||
|
|
||||||
if (looking_for & DBIT)
|
if (looking_for & DBIT)
|
||||||
{
|
{
|
||||||
if ((looking_for & 2) != (thisnib & 2))
|
/* Exclude adds/subs by looking at bit 0 and 2, and
|
||||||
|
make sure the operand size, either w or l,
|
||||||
|
matches by looking at bit 1. */
|
||||||
|
if ((looking_for & 7) != (thisnib & 7))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
abs = (thisnib & 0x8) ? 2 : 1;
|
abs = (thisnib & 0x8) ? 2 : 1;
|
||||||
@ -351,13 +352,15 @@ bfd_h8_disassemble (addr, info, mode)
|
|||||||
{
|
{
|
||||||
abs += 2;
|
abs += 2;
|
||||||
fprintf (stream,
|
fprintf (stream,
|
||||||
".%s%d (%x)", (short) abs > 0 ? "+" : "",
|
".%s%d (%x)",
|
||||||
|
(short) abs > 0 ? "+" : "",
|
||||||
(short) abs, addr + (short) abs + 2);
|
(short) abs, addr + (short) abs + 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (stream,
|
fprintf (stream,
|
||||||
".%s%d (%x)", (char) abs > 0 ? "+" : "",
|
".%s%d (%x)",
|
||||||
|
(char) abs > 0 ? "+" : "",
|
||||||
(char) abs, addr + (char) abs + 2);
|
(char) abs, addr + (char) abs + 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -402,7 +405,6 @@ bfd_h8_disassemble (addr, info, mode)
|
|||||||
fprintf (stream, "%02x %02x .word\tH'%x,H'%x",
|
fprintf (stream, "%02x %02x .word\tH'%x,H'%x",
|
||||||
data[0], data[1],
|
data[0], data[1],
|
||||||
data[0], data[1]);
|
data[0], data[1]);
|
||||||
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user