Fix pc after ppc sc inst

This commit is contained in:
Bet4
2022-02-19 21:20:41 +08:00
parent fc4ca3b04f
commit d96083d4d1
2 changed files with 31 additions and 0 deletions

View File

@@ -386,6 +386,10 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
#if defined(TARGET_RISCV)
CPURISCVState *env = &(RISCV_CPU(uc->cpu)->env);
env->pc += 4;
#endif
#if defined(TARGET_PPC)
CPUPPCState *env = &(POWERPC_CPU(uc->cpu)->env);
env->nip += 4;
#endif
// Unicorn: call registered interrupt callbacks
catched = false;