21 #include <linux/string.h>
33 #define SPU_DISASM_TBL_SIZE (1 << 11)
37 init_spu_disassemble (
void)
48 if (spu_disassemble_table[o] == 0)
55 get_index_for_opcode (
unsigned int insn)
58 unsigned int opcode = insn >> (32-11);
62 if (spu_disassemble_table[0] == 0)
63 init_spu_disassemble ();
65 if ((index = spu_disassemble_table[opcode & 0x780]) != 0
69 if ((index = spu_disassemble_table[opcode & 0x7f0]) != 0
73 if ((index = spu_disassemble_table[opcode & 0x7f8]) != 0
77 if ((index = spu_disassemble_table[opcode & 0x7fc]) != 0
81 if ((index = spu_disassemble_table[opcode & 0x7fe]) != 0
85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0)
101 index = get_index_for_opcode (insn);
105 printf(
".long 0x%x", insn);
113 if (tag == M_BI || tag == M_BISL || tag == M_IRET || tag == M_BISLED
114 || tag == M_BIHNZ || tag == M_BIHZ || tag == M_BINZ || tag == M_BIZ
115 || tag == M_SYNC || tag == M_HBR)
117 int fb = (insn >> (32-18)) & 0x7f;
119 printf(tag == M_SYNC ?
"c" :
"p");
125 if (index->
arg[0] != 0)
128 for (i = 1; i <= index->
arg[0]; i++)
131 if (arg !=
A_P && !paren && i > 1)
212 hex_value = memaddr +
value;
238 if (arg !=
A_P && paren)
245 printf(
"\t# %x", hex_value);