aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/ppc-dis.c6
-rw-r--r--arch/powerpc/xmon/xmon.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/arch/powerpc/xmon/ppc-dis.c b/arch/powerpc/xmon/ppc-dis.c
index ac0a9d2427e..3b67bee4830 100644
--- a/arch/powerpc/xmon/ppc-dis.c
+++ b/arch/powerpc/xmon/ppc-dis.c
@@ -27,14 +27,14 @@ extern void print_address (unsigned long memaddr);
27/* Print a PowerPC or POWER instruction. */ 27/* Print a PowerPC or POWER instruction. */
28 28
29int 29int
30print_insn_powerpc (unsigned long insn, unsigned long memaddr, int dialect) 30print_insn_powerpc (unsigned long insn, unsigned long memaddr)
31{ 31{
32 const struct powerpc_opcode *opcode; 32 const struct powerpc_opcode *opcode;
33 const struct powerpc_opcode *opcode_end; 33 const struct powerpc_opcode *opcode_end;
34 unsigned long op; 34 unsigned long op;
35 int dialect;
35 36
36 if (dialect == 0) 37 dialect = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON
37 dialect = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON
38 | PPC_OPCODE_64 | PPC_OPCODE_POWER4 | PPC_OPCODE_ALTIVEC; 38 | PPC_OPCODE_64 | PPC_OPCODE_POWER4 | PPC_OPCODE_ALTIVEC;
39 39
40 /* Get the major opcode of the instruction. */ 40 /* Get the major opcode of the instruction. */
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index be2c12d6878..a39b17638b7 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -154,7 +154,7 @@ static int do_spu_cmd(void);
154 154
155int xmon_no_auto_backtrace; 155int xmon_no_auto_backtrace;
156 156
157extern int print_insn_powerpc(unsigned long, unsigned long, int); 157extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr);
158 158
159extern void xmon_enter(void); 159extern void xmon_enter(void);
160extern void xmon_leave(void); 160extern void xmon_leave(void);
@@ -2068,8 +2068,11 @@ prdump(unsigned long adrs, long ndump)
2068 } 2068 }
2069} 2069}
2070 2070
2071typedef int (*instruction_dump_func)(unsigned long inst, unsigned long addr);
2072
2071int 2073int
2072ppc_inst_dump(unsigned long adr, long count, int praddr) 2074generic_inst_dump(unsigned long adr, long count, int praddr,
2075 instruction_dump_func dump_func)
2073{ 2076{
2074 int nr, dotted; 2077 int nr, dotted;
2075 unsigned long first_adr; 2078 unsigned long first_adr;
@@ -2099,12 +2102,18 @@ ppc_inst_dump(unsigned long adr, long count, int praddr)
2099 if (praddr) 2102 if (praddr)
2100 printf(REG" %.8x", adr, inst); 2103 printf(REG" %.8x", adr, inst);
2101 printf("\t"); 2104 printf("\t");
2102 print_insn_powerpc(inst, adr, 0); /* always returns 4 */ 2105 dump_func(inst, adr);
2103 printf("\n"); 2106 printf("\n");
2104 } 2107 }
2105 return adr - first_adr; 2108 return adr - first_adr;
2106} 2109}
2107 2110
2111int
2112ppc_inst_dump(unsigned long adr, long count, int praddr)
2113{
2114 return generic_inst_dump(adr, count, praddr, print_insn_powerpc);
2115}
2116
2108void 2117void
2109print_address(unsigned long addr) 2118print_address(unsigned long addr)
2110{ 2119{