mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 21:47:47 +00:00
unicorn/arm: use uc->cpu instead of uc->current_cpu
Keeps cpu variable usage consistent. Also eliminates unnecessary casts
This commit is contained in:
parent
890f234a53
commit
d0abc23e99
2 changed files with 7 additions and 3 deletions
|
@ -14,7 +14,9 @@ const int ARM64_REGS_STORAGE_SIZE = offsetof(CPUARMState, tlb_table);
|
||||||
|
|
||||||
static void arm64_set_pc(struct uc_struct *uc, uint64_t address)
|
static void arm64_set_pc(struct uc_struct *uc, uint64_t address)
|
||||||
{
|
{
|
||||||
((CPUARMState *)uc->current_cpu->env_ptr)->pc = address;
|
CPUArchState *state = uc->cpu->env_ptr;
|
||||||
|
|
||||||
|
state->pc = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
void arm64_release(void* ctx);
|
void arm64_release(void* ctx);
|
||||||
|
|
|
@ -14,8 +14,10 @@ const int ARM_REGS_STORAGE_SIZE = offsetof(CPUARMState, tlb_table);
|
||||||
|
|
||||||
static void arm_set_pc(struct uc_struct *uc, uint64_t address)
|
static void arm_set_pc(struct uc_struct *uc, uint64_t address)
|
||||||
{
|
{
|
||||||
((CPUARMState *)uc->current_cpu->env_ptr)->pc = address;
|
CPUArchState *state = uc->cpu->env_ptr;
|
||||||
((CPUARMState *)uc->current_cpu->env_ptr)->regs[15] = address;
|
|
||||||
|
state->pc = address;
|
||||||
|
state->regs[15] = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
void arm_release(void* ctx);
|
void arm_release(void* ctx);
|
||||||
|
|
Loading…
Reference in a new issue