Virtualmips modified to allow access to SRSCtl register.
When only one GPR set supported, opcodes RDPGPR and WRPGPR behave like MOVE instruction.
This commit is contained in:
@@ -1684,7 +1684,8 @@ static int rdpgpr_op (cpu_mips_t * cpu, mips_insn_t insn)
|
|||||||
int rt = bits (insn, 16, 20);
|
int rt = bits (insn, 16, 20);
|
||||||
int rd = bits (insn, 11, 15);
|
int rd = bits (insn, 11, 15);
|
||||||
|
|
||||||
printf ("%08x: unsupported RDPGPR $%u,$%u instruction.\n", cpu->pc, rd, rt);
|
/* Only one GPR set supported: RDPGPR works as move. */
|
||||||
|
cpu->reg_set (cpu, rd, cpu->gpr[rt]);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1693,7 +1694,8 @@ static int wrpgpr_op (cpu_mips_t * cpu, mips_insn_t insn)
|
|||||||
int rt = bits (insn, 16, 20);
|
int rt = bits (insn, 16, 20);
|
||||||
int rd = bits (insn, 11, 15);
|
int rd = bits (insn, 11, 15);
|
||||||
|
|
||||||
printf ("%08x: unsupported WRPGPR $%u,$%u instruction.\n", cpu->pc, rd, rt);
|
/* Only one GPR set supported: WRPGPR works as move. */
|
||||||
|
cpu->reg_set (cpu, rd, cpu->gpr[rt]);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ unimpl: fprintf (stderr,
|
|||||||
return cp0->reg[cp0_reg];
|
return cp0->reg[cp0_reg];
|
||||||
case 1: /* IntCtl */
|
case 1: /* IntCtl */
|
||||||
return cp0->intctl_reg;
|
return cp0->intctl_reg;
|
||||||
|
case 2: /* SRSCtl */
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
goto unimpl;
|
goto unimpl;
|
||||||
|
|
||||||
@@ -172,6 +174,8 @@ void mips_cp0_set_reg (cpu_mips_t * cpu, u_int cp0_reg, u_int sel,
|
|||||||
case 1: /* IntCtl */
|
case 1: /* IntCtl */
|
||||||
cp0->intctl_reg = val;
|
cp0->intctl_reg = val;
|
||||||
break;
|
break;
|
||||||
|
case 2: /* SRSCtl */
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
goto unimpl;
|
goto unimpl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user