Removed hardcoded CP0C3_ULRI (#1098)
* activate CP0C3_ULRI for CONFIG3, mips * updated with mips patches * updated with mips patches * remove hardcoded config3 * git ignore vscode * fix spacing issue and turn on floating point
This commit is contained in:

committed by
Nguyen Anh Quynh

parent
0cd69ee03b
commit
24f55a7973
@ -47,6 +47,10 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
|
||||
cpu_restore_state(cs, pc);
|
||||
}
|
||||
|
||||
if (exception == 0x11) {
|
||||
env->uc->next_pc = env->active_tc.PC + 4;
|
||||
}
|
||||
|
||||
cpu_loop_exit(cs);
|
||||
}
|
||||
|
||||
|
@ -19711,6 +19711,9 @@ void cpu_state_reset(CPUMIPSState *env)
|
||||
env->tcs[0].CP0_TCStatus = (1 << CP0TCSt_A);
|
||||
}
|
||||
}
|
||||
if (env->CP0_Config1 & (1 << CP0C1_FP)) {
|
||||
env->CP0_Status |= (1 << CP0St_CU1);
|
||||
}
|
||||
#endif
|
||||
if ((env->insn_flags & ISA_MIPS32R6) &&
|
||||
(env->active_fpu.fcr0 & (1 << FCR0_F64))) {
|
||||
|
@ -43,8 +43,7 @@
|
||||
#define MIPS_CONFIG3 \
|
||||
((0 << CP0C3_M) | (0 << CP0C3_DSPP) | (0 << CP0C3_LPA) | \
|
||||
(0 << CP0C3_VEIC) | (0 << CP0C3_VInt) | (0 << CP0C3_SP) | \
|
||||
(0 << CP0C3_SM) | (0 << CP0C3_TL)) | (1 << CP0C3_ULRI)
|
||||
|
||||
(0 << CP0C3_SM) | (0 << CP0C3_TL))
|
||||
#define MIPS_CONFIG4 \
|
||||
((0 << CP0C4_M))
|
||||
|
||||
|
@ -96,6 +96,12 @@ int mips_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int cou
|
||||
case UC_MIPS_REG_PC:
|
||||
*(mipsreg_t *)value = MIPS_CPU(uc, mycpu)->env.active_tc.PC;
|
||||
break;
|
||||
case UC_MIPS_REG_CP0_CONFIG3:
|
||||
*(mipsreg_t *)value = MIPS_CPU(uc, mycpu)->env.CP0_Config3;
|
||||
break;
|
||||
case UC_MIPS_REG_CP0_USERLOCAL:
|
||||
*(mipsreg_t *)value = MIPS_CPU(uc, mycpu)->env.active_tc.CP0_UserLocal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -122,6 +128,12 @@ int mips_reg_write(struct uc_struct *uc, unsigned int *regs, void *const *vals,
|
||||
uc->quit_request = true;
|
||||
uc_emu_stop(uc);
|
||||
break;
|
||||
case UC_MIPS_REG_CP0_CONFIG3:
|
||||
MIPS_CPU(uc, mycpu)->env.CP0_Config3 = *(mipsreg_t *)value;
|
||||
break;
|
||||
case UC_MIPS_REG_CP0_USERLOCAL:
|
||||
MIPS_CPU(uc, mycpu)->env.active_tc.CP0_UserLocal = *(mipsreg_t *)value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user