Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cpu/ppc/ppcdisasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,14 +1176,14 @@ void opc_group31(PPCDisasmContext* ctx) {
if (!rs && !ra)
opc_illegal(ctx);
else {
ctx->instr_str = my_sprintf("%-7s r%s", "tlbld", rb);
ctx->instr_str = my_sprintf("%-7s r%d", "tlbld", rb);
add_reg_in(ctx, "r%d", rb);
}
} else if (index == 30) { /* tlbli - 603 only */
} else if (index == 31) { /* tlbli - 603 only */
if (!rs && !ra)
opc_illegal(ctx);
else {
ctx->instr_str = my_sprintf("%-7s r%s", "tlbli", rb);
ctx->instr_str = my_sprintf("%-7s r%d", "tlbli", rb);
add_reg_in(ctx, "r%d", rb);
}
}
Expand Down Expand Up @@ -1250,10 +1250,10 @@ void opc_group31(PPCDisasmContext* ctx) {
add_reg_out(ctx, "cr");
}
} else {
strcpy(opcode, opc_logic[index]);
if (!strlen(opcode)) {
if (index >= 16 || !strlen(opc_logic[index])) {
opc_illegal(ctx);
} else {
strcpy(opcode, opc_logic[index]);
if (rc_set) {
strcat(opcode, ".");
add_reg_out(ctx, "cr");
Expand Down
4 changes: 4 additions & 0 deletions cpu/ppc/test/ppcdisasmtest.csv
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@
0xFFF00100,0x7D453D2A,stswx,r10,r5,r7
0xFFF00100,0x7C0002E4,tlbia
0xFFF00100,0x7C004A64,tlbie,r9
0xFFF00100,0x7C202FA4,tlbld,r5
0xFFF00100,0x7C6007A4,tlbld,r0
0xFFF00100,0x7C203FE4,tlbli,r7
0xFFF00100,0x7C40FFE4,tlbli,r31

# various simplified (extended) mnemonics
0xFFF00100,0x60000000,nop
Expand Down
Loading