mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 06:28:12 +00:00
Set thumb mode based on PC value in ARM. Mask off last bit of PC.
This commit is contained in:
parent
d92b37ed7d
commit
3a1c13fda9
1 changed files with 3 additions and 2 deletions
|
@ -106,8 +106,9 @@ int arm_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, i
|
|||
break;
|
||||
//case UC_ARM_REG_PC:
|
||||
case UC_ARM_REG_R15:
|
||||
ARM_CPU(uc, mycpu)->env.pc = *(uint32_t *)value;
|
||||
ARM_CPU(uc, mycpu)->env.regs[15] = *(uint32_t *)value;
|
||||
ARM_CPU(uc, mycpu)->env.pc = (*(uint32_t *)value & ~1);
|
||||
ARM_CPU(uc, mycpu)->env.thumb = (*(uint32_t *)value & 1);
|
||||
ARM_CPU(uc, mycpu)->env.regs[15] = (*(uint32_t *)value & ~1);
|
||||
// force to quit execution and flush TB
|
||||
uc->quit_request = true;
|
||||
uc_emu_stop(uc);
|
||||
|
|
Loading…
Reference in a new issue