Fix PC write for PPC32/64

This commit is contained in:
mio 2022-10-28 16:23:50 +02:00
parent 4b961a8ef6
commit 3c18ddcc41
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
1 changed files with 5 additions and 1 deletions

6
uc.c
View File

@ -811,7 +811,11 @@ uc_err uc_emu_start(uc_engine *uc, uint64_t begin, uint64_t until,
#endif
#ifdef UNICORN_HAS_PPC
case UC_ARCH_PPC:
uc_reg_write(uc, UC_PPC_REG_PC, &begin);
if (uc->mode & UC_MODE_PPC64) {
uc_reg_write(uc, UC_PPC_REG_PC, &begin);
} else {
uc_reg_write(uc, UC_PPC_REG_PC, &begin_pc32);
}
break;
#endif
#ifdef UNICORN_HAS_RISCV