One more fix for the segment reg instructions

This commit is contained in:
dingusdev 2020-02-13 21:46:12 -07:00
parent 07844c7388
commit 17e69677e8

View File

@ -827,10 +827,7 @@ void opc_group31(PPCDisasmContext* ctx)
ctx->instr_str = my_sprintf("%-8s%d, r%d", "mtsr", ra, rs); ctx->instr_str = my_sprintf("%-8s%d, r%d", "mtsr", ra, rs);
} }
else if (index == 7) { /* mtsrin */ else if (index == 7) { /* mtsrin */
if (rb & 16) ctx->instr_str = my_sprintf("%-8sr%d, r%d", "mtsrin", rs, rb);
opc_illegal(ctx);
else
ctx->instr_str = my_sprintf("%-8sr%d, r%d", "mtsrin", rs, rb);
} }
else if (index == 9) { /* tlbie */ else if (index == 9) { /* tlbie */
ctx->instr_str = my_sprintf("%-8sr%d", "tlbie", rb); ctx->instr_str = my_sprintf("%-8sr%d", "tlbie", rb);
@ -1185,6 +1182,12 @@ void opc_group31(PPCDisasmContext* ctx)
fmt_threeop(ctx->instr_str, opcode, ra, rs, rb); fmt_threeop(ctx->instr_str, opcode, ra, rs, rb);
return; return;
case 595: /* mfsr */
if (ra & 16)
opc_illegal(ctx);
else
ctx->instr_str = my_sprintf("%-8sr%d, %d", "mfsr", rs, ra);
break;
case 597: /* lswi */ case 597: /* lswi */
if (rc_set) { if (rc_set) {
opc_illegal(ctx); opc_illegal(ctx);
@ -1199,6 +1202,9 @@ void opc_group31(PPCDisasmContext* ctx)
fmt_threeop_simm(ctx->instr_str, "lswi", rs, ra, rb); fmt_threeop_simm(ctx->instr_str, "lswi", rs, ra, rb);
} }
break; break;
case 659: /* mfsrin */
ctx->instr_str = my_sprintf("%-8sr%d, r%d", "mtsrin", rs, rb);
break;
case 661: /* stswx */ case 661: /* stswx */
if (rc_set) { if (rc_set) {
opc_illegal(ctx); opc_illegal(ctx);