mirror of
https://github.com/dingusdev/dingusppc.git
synced 2026-04-22 00:17:00 +00:00
Fix bugs caught by fuzzing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user