mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
Fixed cntlzw, mtsr(in), tlbie
This commit is contained in:
parent
3d89b0438a
commit
73dfec443a
@ -818,19 +818,25 @@ void opc_group31(PPCDisasmContext* ctx)
|
||||
}
|
||||
return;
|
||||
|
||||
case 0x12: /* tlb instructions */
|
||||
case 0x12: /* tlb & segment register instructions */
|
||||
|
||||
if (index == 11) {
|
||||
if (!rs & !ra & !rb)
|
||||
if (index == 6) { /* mtsr */
|
||||
if (ra & 16)
|
||||
opc_illegal(ctx);
|
||||
else
|
||||
ctx->instr_str = my_sprintf("%-8s", "tlbia");
|
||||
ctx->instr_str = my_sprintf("%-8s%d, r%d", "mtsr", ra, rs);
|
||||
}
|
||||
else if (index == 18) {
|
||||
if (!rs & !ra)
|
||||
else if (index == 7) { /* mtsrin */
|
||||
if (rb & 16)
|
||||
opc_illegal(ctx);
|
||||
else
|
||||
ctx->instr_str = my_sprintf("%-8sr%s", "tlbie", rb);
|
||||
ctx->instr_str = my_sprintf("%-8sr%d, r%d", "mtsrin", rs, rb);
|
||||
}
|
||||
else if (index == 9) { /* tlbie */
|
||||
ctx->instr_str = my_sprintf("%-8sr%s", "tlbie", rb);
|
||||
}
|
||||
else if (index == 11) { /* tlbia */
|
||||
ctx->instr_str = my_sprintf("%-8s", "tlbia");
|
||||
}
|
||||
else if (index == 30) { /* tlbld - 603 only */
|
||||
if (!rs & !ra)
|
||||
@ -884,9 +890,11 @@ void opc_group31(PPCDisasmContext* ctx)
|
||||
|
||||
return;
|
||||
|
||||
case 0x1A: /* Byte sign extend instructions */
|
||||
case 0x1A: /* Byte sign extend instructions (and cntlzw) */
|
||||
|
||||
if (index == 28)
|
||||
if (index == 0)
|
||||
strcpy(opcode, "cntlzw");
|
||||
else if (index == 28)
|
||||
strcpy(opcode, "extsh");
|
||||
else if (index == 29)
|
||||
strcpy(opcode, "extsb");
|
||||
@ -996,10 +1004,7 @@ void opc_group31(PPCDisasmContext* ctx)
|
||||
}
|
||||
}
|
||||
else if (index == 30) { /* icbi */
|
||||
if (rs == 0)
|
||||
opc_illegal(ctx);
|
||||
else
|
||||
fmt_twoop(ctx->instr_str, opcode, ra, rb);
|
||||
fmt_twoop(ctx->instr_str, opcode, ra, rb);
|
||||
}
|
||||
else if (index == 17) { /* tlbsync */
|
||||
ctx->instr_str = my_sprintf("%-8s", opcode);
|
||||
@ -1053,15 +1058,6 @@ void opc_group31(PPCDisasmContext* ctx)
|
||||
else
|
||||
fmt_threeop(ctx->instr_str, "lwarx", rs, ra, rb);
|
||||
}
|
||||
break;
|
||||
case 26: /* cntlzw */
|
||||
printf("CASE REACH! \n");
|
||||
|
||||
if (rc_set)
|
||||
fmt_twoop(ctx->instr_str, "cntlzw.", rs, ra);
|
||||
else
|
||||
fmt_twoop(ctx->instr_str, "cntlzw", rs, ra);
|
||||
|
||||
break;
|
||||
case 29: /* maskg */
|
||||
strcpy(opcode, "maskg");
|
||||
@ -1092,18 +1088,6 @@ void opc_group31(PPCDisasmContext* ctx)
|
||||
case 146: /* mtmsr */
|
||||
fmt_oneop(ctx->instr_str, "mtmsr", rs);
|
||||
break;
|
||||
case 210: /* mtsr */
|
||||
if (ra & 16)
|
||||
opc_illegal(ctx);
|
||||
else
|
||||
ctx->instr_str = my_sprintf("%-8%d, r%d", "mtsr", ra, rs);
|
||||
break;
|
||||
case 242: /* mtsrin */
|
||||
if (rb & 16)
|
||||
opc_illegal(ctx);
|
||||
else
|
||||
ctx->instr_str = my_sprintf("%-8r%d, r%d", "mtsr", rs, rb);
|
||||
break;
|
||||
case 277: /* lscbx */
|
||||
strcpy(opcode, "lscbx");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user