mips: support reading and writing of hi/lo regs
This commit is contained in:
parent
8732cff287
commit
7268c2a19b
|
@ -77,6 +77,12 @@ static void reg_read(CPUMIPSState *env, unsigned int regid, void *value)
|
|||
switch (regid) {
|
||||
default:
|
||||
break;
|
||||
case UC_MIPS_REG_HI:
|
||||
*(mipsreg_t *)value = env->active_tc.HI[0];
|
||||
break;
|
||||
case UC_MIPS_REG_LO:
|
||||
*(mipsreg_t *)value = env->active_tc.LO[0];
|
||||
break;
|
||||
case UC_MIPS_REG_PC:
|
||||
*(mipsreg_t *)value = env->active_tc.PC;
|
||||
break;
|
||||
|
@ -103,6 +109,12 @@ static void reg_write(CPUMIPSState *env, unsigned int regid, const void *value)
|
|||
switch (regid) {
|
||||
default:
|
||||
break;
|
||||
case UC_MIPS_REG_HI:
|
||||
env->active_tc.HI[0] = *(mipsreg_t *)value;
|
||||
break;
|
||||
case UC_MIPS_REG_LO:
|
||||
env->active_tc.LO[0] = *(mipsreg_t *)value;
|
||||
break;
|
||||
case UC_MIPS_REG_PC:
|
||||
env->active_tc.PC = *(mipsreg_t *)value;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue