Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42285
b: refs/heads/master
c: 4c4c872
h: refs/heads/master
i:
  42283: 386f192
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Dec 4, 2006
1 parent 970db40 commit f052d62
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24a24c85d3c35790a355138d7cd34c074cb1b3ac
refs/heads/master: 4c4c8723684b1b2cd0dfdf5e0685f35642bde253
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/xmon/ppc-dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ extern void print_address (unsigned long memaddr);
/* Print a PowerPC or POWER instruction. */

int
print_insn_powerpc (unsigned long insn, unsigned long memaddr, int dialect)
print_insn_powerpc (unsigned long insn, unsigned long memaddr)
{
const struct powerpc_opcode *opcode;
const struct powerpc_opcode *opcode_end;
unsigned long op;
int dialect;

if (dialect == 0)
dialect = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON
dialect = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON
| PPC_OPCODE_64 | PPC_OPCODE_POWER4 | PPC_OPCODE_ALTIVEC;

/* Get the major opcode of the instruction. */
Expand Down
15 changes: 12 additions & 3 deletions trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static int do_spu_cmd(void);

int xmon_no_auto_backtrace;

extern int print_insn_powerpc(unsigned long, unsigned long, int);
extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr);

extern void xmon_enter(void);
extern void xmon_leave(void);
Expand Down Expand Up @@ -2068,8 +2068,11 @@ prdump(unsigned long adrs, long ndump)
}
}

typedef int (*instruction_dump_func)(unsigned long inst, unsigned long addr);

int
ppc_inst_dump(unsigned long adr, long count, int praddr)
generic_inst_dump(unsigned long adr, long count, int praddr,
instruction_dump_func dump_func)
{
int nr, dotted;
unsigned long first_adr;
Expand Down Expand Up @@ -2099,12 +2102,18 @@ ppc_inst_dump(unsigned long adr, long count, int praddr)
if (praddr)
printf(REG" %.8x", adr, inst);
printf("\t");
print_insn_powerpc(inst, adr, 0); /* always returns 4 */
dump_func(inst, adr);
printf("\n");
}
return adr - first_adr;
}

int
ppc_inst_dump(unsigned long adr, long count, int praddr)
{
return generic_inst_dump(adr, count, praddr, print_insn_powerpc);
}

void
print_address(unsigned long addr)
{
Expand Down

0 comments on commit f052d62

Please sign in to comment.