objdump uses now MOTOROLA syntax

This commit is contained in:
bebbo 2018-02-04 23:50:02 +01:00
parent 467e8b9ef9
commit f494ffb0f9
2 changed files with 128 additions and 90 deletions

View File

@ -48,6 +48,7 @@ static int exit_status = 0;
static char *default_target = NULL; /* Default at runtime. */ static char *default_target = NULL; /* Default at runtime. */
static int asm_pure = 0; /* -A */
static int show_version = 0; /* Show the version number. */ static int show_version = 0; /* Show the version number. */
static int dump_section_contents; /* -s */ static int dump_section_contents; /* -s */
static int dump_section_headers; /* -h */ static int dump_section_headers; /* -h */
@ -197,6 +198,7 @@ usage (stream, status)
fprintf (stream, _(" Display information from object <file(s)>.\n")); fprintf (stream, _(" Display information from object <file(s)>.\n"));
fprintf (stream, _(" At least one of the following switches must be given:\n")); fprintf (stream, _(" At least one of the following switches must be given:\n"));
fprintf (stream, _("\ fprintf (stream, _("\
-A, --asm-pure Display pure assembler without line number and data\n\
-a, --archive-headers Display archive header information\n\ -a, --archive-headers Display archive header information\n\
-f, --file-headers Display the contents of the overall file header\n\ -f, --file-headers Display the contents of the overall file header\n\
-p, --private-headers Display object format specific file header contents\n\ -p, --private-headers Display object format specific file header contents\n\
@ -261,6 +263,7 @@ static struct option long_options[]=
{ {
{"adjust-vma", required_argument, NULL, OPTION_ADJUST_VMA}, {"adjust-vma", required_argument, NULL, OPTION_ADJUST_VMA},
{"all-headers", no_argument, NULL, 'x'}, {"all-headers", no_argument, NULL, 'x'},
{"asm-pure", no_argument, NULL, 'A'},
{"private-headers", no_argument, NULL, 'p'}, {"private-headers", no_argument, NULL, 'p'},
{"architecture", required_argument, NULL, 'm'}, {"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'}, {"archive-headers", no_argument, NULL, 'a'},
@ -816,13 +819,14 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
struct disassemble_info *info; struct disassemble_info *info;
bfd_boolean skip_zeroes; bfd_boolean skip_zeroes;
{ {
objdump_print_value (vma, info, skip_zeroes); if (!asm_pure)
objdump_print_value (vma, info, skip_zeroes);
if (sym == NULL) if (sym == NULL)
{ {
bfd_vma secaddr; bfd_vma secaddr;
(*info->fprintf_func) (info->stream, " <%s", (*info->fprintf_func) (info->stream, asm_pure ? "%s" : "<%s",
bfd_get_section_name (abfd, sec)); bfd_get_section_name (abfd, sec));
secaddr = bfd_get_section_vma (abfd, sec); secaddr = bfd_get_section_vma (abfd, sec);
if (vma < secaddr) if (vma < secaddr)
@ -835,11 +839,13 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
(*info->fprintf_func) (info->stream, "+0x"); (*info->fprintf_func) (info->stream, "+0x");
objdump_print_value (vma - secaddr, info, TRUE); objdump_print_value (vma - secaddr, info, TRUE);
} }
(*info->fprintf_func) (info->stream, ">"); if (!asm_pure)
(*info->fprintf_func) (info->stream, ">");
} }
else else
{ {
(*info->fprintf_func) (info->stream, " <"); if (!asm_pure)
(*info->fprintf_func) (info->stream, "<");
objdump_print_symname (abfd, info, sym); objdump_print_symname (abfd, info, sym);
if (bfd_asymbol_value (sym) > vma) if (bfd_asymbol_value (sym) > vma)
{ {
@ -851,7 +857,8 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
(*info->fprintf_func) (info->stream, "+0x"); (*info->fprintf_func) (info->stream, "+0x");
objdump_print_value (vma - bfd_asymbol_value (sym), info, TRUE); objdump_print_value (vma - bfd_asymbol_value (sym), info, TRUE);
} }
(*info->fprintf_func) (info->stream, ">"); if (!asm_pure)
(*info->fprintf_func) (info->stream, ">");
} }
} }
@ -1219,7 +1226,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
zeroes in chunks of 4, ensuring that there is always a leading zeroes in chunks of 4, ensuring that there is always a leading
zero remaining. */ zero remaining. */
skip_addr_chars = 0; skip_addr_chars = 0;
if (! prefix_addresses) if (! prefix_addresses && !asm_pure)
{ {
char buf[30]; char buf[30];
char *s; char *s;
@ -1285,25 +1292,27 @@ disassemble_bytes (info, disassemble_fn, insns, data,
when calling show_line. */ when calling show_line. */
show_line (aux->abfd, section, addr_offset - adjust_section_vma); show_line (aux->abfd, section, addr_offset - adjust_section_vma);
if (! prefix_addresses) if (!asm_pure)
{ {
char *s; if (! prefix_addresses)
{
char *s;
bfd_sprintf_vma (aux->abfd, buf, section->vma + addr_offset); bfd_sprintf_vma (aux->abfd, buf, section->vma + addr_offset);
for (s = buf + skip_addr_chars; *s == '0'; s++) for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' '; *s = ' ';
if (*s == '\0') if (*s == '\0')
*--s = '0'; *--s = '0';
printf ("%s:\t", buf + skip_addr_chars); printf ("%s:\t", buf + skip_addr_chars);
}
else
{
aux->require_sec = TRUE;
objdump_print_address (section->vma + addr_offset, info);
aux->require_sec = FALSE;
putchar (' ');
}
} }
else
{
aux->require_sec = TRUE;
objdump_print_address (section->vma + addr_offset, info);
aux->require_sec = FALSE;
putchar (' ');
}
if (insns) if (insns)
{ {
sfile.size = 120; sfile.size = 120;
@ -1345,6 +1354,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
#endif #endif
info->flags = 0; info->flags = 0;
if (asm_pure)
printf("\t");
octets = (*disassemble_fn) (section->vma + addr_offset, info); octets = (*disassemble_fn) (section->vma + addr_offset, info);
info->fprintf_func = (fprintf_ftype) fprintf; info->fprintf_func = (fprintf_ftype) fprintf;
info->stream = stdout; info->stream = stdout;
@ -1376,9 +1388,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
buf[j - addr_offset * opb] = '\0'; buf[j - addr_offset * opb] = '\0';
} }
if (prefix_addresses if (!asm_pure && (prefix_addresses
? show_raw_insn > 0 ? show_raw_insn > 0
: show_raw_insn >= 0) : show_raw_insn >= 0))
{ {
bfd_vma j; bfd_vma j;
@ -1434,9 +1446,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
free (sfile.buffer); free (sfile.buffer);
} }
if (prefix_addresses if (!asm_pure && (prefix_addresses
? show_raw_insn > 0 ? show_raw_insn > 0
: show_raw_insn >= 0) : show_raw_insn >= 0))
{ {
while (pb < octets) while (pb < octets)
{ {
@ -2647,7 +2659,7 @@ main (argc, argv)
bfd_init (); bfd_init ();
set_default_bfd_target (); set_default_bfd_target ();
while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSj:wE:zgG", while ((c = getopt_long (argc, argv, "Apib:m:M:VvCdDlfaHhrRtTxsSj:wE:zgG",
long_options, (int *) 0)) long_options, (int *) 0))
!= EOF) != EOF)
{ {
@ -2655,6 +2667,9 @@ main (argc, argv)
{ {
case 0: case 0:
break; /* We've been given a long option. */ break; /* We've been given a long option. */
case 'A':
asm_pure = TRUE;
break;
case 'm': case 'm':
machine = optarg; machine = optarg;
break; break;

View File

@ -25,6 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "opcode/m68k.h" #include "opcode/m68k.h"
#undef sprintf_vma
#define sprintf_vma(b,n) sprintf(b,"%d",(int)n)
/* Extra info to pass to the disassembler address printing function. */ /* Extra info to pass to the disassembler address printing function. */
struct objdump_disasm_info struct objdump_disasm_info
{ {
@ -61,14 +64,14 @@ print_insn_arg PARAMS ((const char *, unsigned char *, unsigned char *,
bfd_vma, disassemble_info *)); bfd_vma, disassemble_info *));
const char * const fpcr_names[] = { const char * const fpcr_names[] = {
"", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr", "", "fpiar", "fpsr", "fpiar/fpsr", "fpcr",
"%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr" "fpiar/fpcr", "fpsr/fpcr", "fpiar/fpsr/fpcr"
}; };
static char *const reg_names[] = { static char *const reg_names[] = {
"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "sp",
"%ps", "%pc" "ps", "pc"
}; };
/* Sign-extend an (unsigned char). */ /* Sign-extend an (unsigned char). */
@ -431,7 +434,7 @@ print_insn_m68k (memaddr, info)
d = best->args; d = best->args;
/* We can the operands twice. The first time we don't print anything, /* We scan the operands twice. The first time we don't print anything,
but look for errors. */ but look for errors. */
save_p = p; save_p = p;
@ -461,7 +464,22 @@ print_insn_m68k (memaddr, info)
d = best->args; d = best->args;
(*info->fprintf_func) (info->stream, "%s", best->name); int bnl = strlen(best->name);
char c = best->name[bnl - 1];
if (strcmp("rts", best->name)
&& strcmp("bfexts", best->name)
&& strcmp("bfins", best->name)
&& strcmp("cas", best->name)
&& (c == 's' || c == 'w' || c == 'b' || c == 'l'))
{
static char b[32];
strcpy(b, best->name);
b[bnl - 1] = '.';
b[bnl] = c;
b[bnl + 1] = 0;
(*info->fprintf_func) (info->stream, "%s", b);
} else
(*info->fprintf_func) (info->stream, "%s", best->name);
if (*d) if (*d)
(*info->fprintf_func) (info->stream, " "); (*info->fprintf_func) (info->stream, " ");
@ -521,7 +539,7 @@ print_insn_arg (d, buffer, p0, addr, info)
{ {
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, (info->stream,
"%s@", "(%s)",
reg_names[fetch_arg (buffer, place, 3, info) + 8]); reg_names[fetch_arg (buffer, place, 3, info) + 8]);
break; break;
} }
@ -534,42 +552,42 @@ print_insn_arg (d, buffer, p0, addr, info)
} }
case 'C': case 'C':
(*info->fprintf_func) (info->stream, "%%ccr"); (*info->fprintf_func) (info->stream, "ccr");
break; break;
case 'S': case 'S':
(*info->fprintf_func) (info->stream, "%%sr"); (*info->fprintf_func) (info->stream, "sr");
break; break;
case 'U': case 'U':
(*info->fprintf_func) (info->stream, "%%usp"); (*info->fprintf_func) (info->stream, "usp");
break; break;
case 'E': case 'E':
(*info->fprintf_func) (info->stream, "%%acc"); (*info->fprintf_func) (info->stream, "acc");
break; break;
case 'G': case 'G':
(*info->fprintf_func) (info->stream, "%%macsr"); (*info->fprintf_func) (info->stream, "macsr");
break; break;
case 'H': case 'H':
(*info->fprintf_func) (info->stream, "%%mask"); (*info->fprintf_func) (info->stream, "mask");
break; break;
case 'J': case 'J':
{ {
static const struct { char *name; int value; } names[] static const struct { char *name; int value; } names[]
= {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002}, = {{"sfc", 0x000}, {"dfc", 0x001}, {"cacr", 0x002},
{"%tc", 0x003}, {"%itt0",0x004}, {"%itt1", 0x005}, {"tc", 0x003}, {"itt0",0x004}, {"itt1", 0x005},
{"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008}, {"dtt0",0x006}, {"dtt1",0x007}, {"buscr",0x008},
{"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802}, {"usp", 0x800}, {"vbr", 0x801}, {"caar", 0x802},
{"%msp", 0x803}, {"%isp", 0x804}, {"msp", 0x803}, {"isp", 0x804},
/* Should we be calling this psr like we do in case 'Y'? */ /* Should we be calling this psr like we do in case 'Y'? */
{"%mmusr",0x805}, {"mmusr",0x805},
{"%urp", 0x806}, {"%srp", 0x807}, {"%pcr", 0x808}}; {"urp", 0x806}, {"srp", 0x807}, {"pcr", 0x808}};
val = fetch_arg (buffer, place, 12, info); val = fetch_arg (buffer, place, 12, info);
for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--) for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--)
@ -632,14 +650,14 @@ print_insn_arg (d, buffer, p0, addr, info)
case 'r': case 'r':
regno = fetch_arg (buffer, place, 4, info); regno = fetch_arg (buffer, place, 4, info);
if (regno > 7) if (regno > 7)
(*info->fprintf_func) (info->stream, "%s@", reg_names[regno]); (*info->fprintf_func) (info->stream, "(%s)", reg_names[regno]);
else else
(*info->fprintf_func) (info->stream, "@(%s)", reg_names[regno]); (*info->fprintf_func) (info->stream, "(%s)", reg_names[regno]);
break; break;
case 'F': case 'F':
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, "%%fp%d", (info->stream, "fp%d",
fetch_arg (buffer, place, 3, info)); fetch_arg (buffer, place, 3, info));
break; break;
@ -653,13 +671,13 @@ print_insn_arg (d, buffer, p0, addr, info)
case '+': case '+':
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, "%s@+", (info->stream, "(%s)+",
reg_names[fetch_arg (buffer, place, 3, info) + 8]); reg_names[fetch_arg (buffer, place, 3, info) + 8]);
break; break;
case '-': case '-':
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, "%s@-", (info->stream, "-(%s)",
reg_names[fetch_arg (buffer, place, 3, info) + 8]); reg_names[fetch_arg (buffer, place, 3, info) + 8]);
break; break;
@ -734,8 +752,8 @@ print_insn_arg (d, buffer, p0, addr, info)
case 'd': case 'd':
val = NEXTWORD (p); val = NEXTWORD (p);
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, "%s@(%d)", (info->stream, "%d(%s)", val,
reg_names[fetch_arg (buffer, place, 3, info) + 8], val); reg_names[fetch_arg (buffer, place, 3, info) + 8]);
break; break;
case 's': case 's':
@ -793,26 +811,27 @@ print_insn_arg (d, buffer, p0, addr, info)
break; break;
case 2: case 2:
(*info->fprintf_func) (info->stream, "%s@", regname); (*info->fprintf_func) (info->stream, "(%s)", regname);
break; break;
case 3: case 3:
(*info->fprintf_func) (info->stream, "%s@+", regname); (*info->fprintf_func) (info->stream, "(%s)+", regname);
break; break;
case 4: case 4:
(*info->fprintf_func) (info->stream, "%s@-", regname); (*info->fprintf_func) (info->stream, "-(%s)", regname);
break; break;
case 5: case 5:
val = NEXTWORD (p); val = NEXTWORD (p);
if (dump_baserel) if (dump_baserel)
{ {
(*info->fprintf_func) (info->stream, "(");
print_base(regno, val, info); print_base(regno, val, info);
(*info->fprintf_func) (info->stream, ")"); (*info->fprintf_func) (info->stream, ")");
} }
else else
(*info->fprintf_func) (info->stream, "%s@(%d)", regname, val); (*info->fprintf_func) (info->stream, "%d(%s)", val, regname);
break; break;
case 6: case 6:
@ -850,9 +869,8 @@ print_insn_arg (d, buffer, p0, addr, info)
case 2: case 2:
val = NEXTWORD (p); val = NEXTWORD (p);
(*info->fprintf_func) (info->stream, "%%pc@(");
(*info->print_address_func) (addr + val, info); (*info->print_address_func) (addr + val, info);
(*info->fprintf_func) (info->stream, ")"); (*info->fprintf_func) (info->stream, "(pc)");
break; break;
case 3: case 3:
@ -977,12 +995,12 @@ print_insn_arg (d, buffer, p0, addr, info)
if (doneany) if (doneany)
(*info->fprintf_func) (info->stream, "/"); (*info->fprintf_func) (info->stream, "/");
doneany = 1; doneany = 1;
(*info->fprintf_func) (info->stream, "%%fp%d", regno); (*info->fprintf_func) (info->stream, "fp%d", regno);
first_regno = regno; first_regno = regno;
while (val & (1 << (regno + 1))) while (val & (1 << (regno + 1)))
++regno; ++regno;
if (regno > first_regno) if (regno > first_regno)
(*info->fprintf_func) (info->stream, "-%%fp%d", regno); (*info->fprintf_func) (info->stream, "-fp%d", regno);
} }
} }
else if (place == '8') else if (place == '8')
@ -1010,24 +1028,24 @@ print_insn_arg (d, buffer, p0, addr, info)
char *name = 0; char *name = 0;
switch (val) switch (val)
{ {
case 2: name = "%tt0"; break; case 2: name = "tt0"; break;
case 3: name = "%tt1"; break; case 3: name = "tt1"; break;
case 0x10: name = "%tc"; break; case 0x10: name = "tc"; break;
case 0x11: name = "%drp"; break; case 0x11: name = "drp"; break;
case 0x12: name = "%srp"; break; case 0x12: name = "srp"; break;
case 0x13: name = "%crp"; break; case 0x13: name = "crp"; break;
case 0x14: name = "%cal"; break; case 0x14: name = "cal"; break;
case 0x15: name = "%val"; break; case 0x15: name = "val"; break;
case 0x16: name = "%scc"; break; case 0x16: name = "scc"; break;
case 0x17: name = "%ac"; break; case 0x17: name = "ac"; break;
case 0x18: name = "%psr"; break; case 0x18: name = "psr"; break;
case 0x19: name = "%pcsr"; break; case 0x19: name = "pcsr"; break;
case 0x1c: case 0x1c:
case 0x1d: case 0x1d:
{ {
int break_reg = ((buffer[3] >> 2) & 7); int break_reg = ((buffer[3] >> 2) & 7);
(*info->fprintf_func) (*info->fprintf_func)
(info->stream, val == 0x1c ? "%%bad%d" : "%%bac%d", (info->stream, val == 0x1c ? "bad%d" : "bac%d",
break_reg); break_reg);
} }
break; break;
@ -1043,9 +1061,9 @@ print_insn_arg (d, buffer, p0, addr, info)
{ {
int fc = fetch_arg (buffer, place, 5, info); int fc = fetch_arg (buffer, place, 5, info);
if (fc == 1) if (fc == 1)
(*info->fprintf_func) (info->stream, "%%dfc"); (*info->fprintf_func) (info->stream, "dfc");
else if (fc == 0) else if (fc == 0)
(*info->fprintf_func) (info->stream, "%%sfc"); (*info->fprintf_func) (info->stream, "sfc");
else else
/* xgettext:c-format */ /* xgettext:c-format */
(*info->fprintf_func) (info->stream, _("<function code %d>"), fc); (*info->fprintf_func) (info->stream, _("<function code %d>"), fc);
@ -1053,7 +1071,7 @@ print_insn_arg (d, buffer, p0, addr, info)
break; break;
case 'V': case 'V':
(*info->fprintf_func) (info->stream, "%%val"); (*info->fprintf_func) (info->stream, "val");
break; break;
case 't': case 't':
@ -1249,7 +1267,7 @@ print_indexed (basereg, p, addr, info)
disassemble_info *info; disassemble_info *info;
{ {
register int word; register int word;
static char *const scales[] = { "", ":2", ":4", ":8" }; static char *const scales[] = { "", "*2", "*4", "*8" };
bfd_vma base_disp; bfd_vma base_disp;
bfd_vma outer_disp; bfd_vma outer_disp;
char buf[40]; char buf[40];
@ -1259,7 +1277,7 @@ print_indexed (basereg, p, addr, info)
/* Generate the text for the index register. /* Generate the text for the index register.
Where this will be output is not yet determined. */ Where this will be output is not yet determined. */
sprintf (buf, "%s:%c%s", sprintf (buf, "%s.%c%s",
reg_names[(word >> 12) & 0xf], reg_names[(word >> 12) & 0xf],
(word & 0x800) ? 'l' : 'w', (word & 0x800) ? 'l' : 'w',
scales[(word >> 9) & 3]); scales[(word >> 9) & 3]);
@ -1273,6 +1291,7 @@ print_indexed (basereg, p, addr, info)
base_disp -= 0x100; base_disp -= 0x100;
if (basereg == -1) if (basereg == -1)
base_disp += addr; base_disp += addr;
(*info->fprintf_func) (info->stream, "(");
print_base (basereg, base_disp, info); print_base (basereg, base_disp, info);
(*info->fprintf_func) (info->stream, ",%s)", buf); (*info->fprintf_func) (info->stream, ",%s)", buf);
return p; return p;
@ -1306,6 +1325,7 @@ print_indexed (basereg, p, addr, info)
if ((word & 7) == 0) if ((word & 7) == 0)
{ {
(*info->fprintf_func) (info->stream, "(");
print_base (basereg, base_disp, info); print_base (basereg, base_disp, info);
if (buf[0] != '\0') if (buf[0] != '\0')
(*info->fprintf_func) (info->stream, ",%s", buf); (*info->fprintf_func) (info->stream, ",%s", buf);
@ -1325,6 +1345,7 @@ print_indexed (basereg, p, addr, info)
outer_disp = NEXTLONG (p); outer_disp = NEXTLONG (p);
} }
(*info->fprintf_func) (info->stream, "([");
print_base (basereg, base_disp, info); print_base (basereg, base_disp, info);
if ((word & 4) == 0 && buf[0] != '\0') if ((word & 4) == 0 && buf[0] != '\0')
{ {
@ -1332,9 +1353,10 @@ print_indexed (basereg, p, addr, info)
buf[0] = '\0'; buf[0] = '\0';
} }
sprintf_vma (vmabuf, outer_disp); sprintf_vma (vmabuf, outer_disp);
(*info->fprintf_func) (info->stream, ")@(%s", vmabuf); (*info->fprintf_func) (info->stream, "]");
if (buf[0] != '\0') if (buf[0] != '\0')
(*info->fprintf_func) (info->stream, ",%s", buf); (*info->fprintf_func) (info->stream, ",%s", buf);
(*info->fprintf_func) (info->stream, ",%s", vmabuf);
(*info->fprintf_func) (info->stream, ")"); (*info->fprintf_func) (info->stream, ")");
return p; return p;
@ -1351,20 +1373,13 @@ print_base (regno, disp, info)
{ {
if (regno == -1) if (regno == -1)
{ {
(*info->fprintf_func) (info->stream, "%%pc@(");
(*info->print_address_func) (disp, info); (*info->print_address_func) (disp, info);
(*info->fprintf_func) (info->stream, ",pc");
} }
else else
{ {
char buf[50]; char buf[50];
if (regno == -2)
(*info->fprintf_func) (info->stream, "@(");
else if (regno == -3)
(*info->fprintf_func) (info->stream, "%%zpc@(");
else
(*info->fprintf_func) (info->stream, "%s@(", reg_names[regno]);
/* Dump the symbol instead of the number*/ /* Dump the symbol instead of the number*/
if (dump_baserel && regno == 12) if (dump_baserel && regno == 12)
{ {
@ -1391,6 +1406,14 @@ print_base (regno, disp, info)
sprintf_vma (buf, disp); sprintf_vma (buf, disp);
(*info->fprintf_func) (info->stream, "%s", buf); (*info->fprintf_func) (info->stream, "%s", buf);
} }
if (regno == -2)
(*info->fprintf_func) (info->stream, "");
else if (regno == -3)
(*info->fprintf_func) (info->stream, ",zpc");
else
(*info->fprintf_func) (info->stream, ",%s", reg_names[regno]);
} }
} }