arm: cleanup for ARM_CPU

This commit is contained in:
Nguyen Anh Quynh 2017-12-21 09:43:33 +08:00
parent 41cc047b87
commit d5f83a9c2e
2 changed files with 4 additions and 6 deletions

View file

@ -29,16 +29,14 @@
static void arm_cpu_set_pc(CPUState *cs, vaddr value) static void arm_cpu_set_pc(CPUState *cs, vaddr value)
{ {
CPUARMState *env = cs->env_ptr; ARMCPU *cpu = ARM_CPU(NULL, cs);
ARMCPU *cpu = ARM_CPU(env->uc, cs);
cpu->env.regs[15] = value; cpu->env.regs[15] = value;
} }
static bool arm_cpu_has_work(CPUState *cs) static bool arm_cpu_has_work(CPUState *cs)
{ {
CPUARMState *env = cs->env_ptr; ARMCPU *cpu = ARM_CPU(NULL, cs);
ARMCPU *cpu = ARM_CPU(env->uc, cs);
return !cpu->powered_off return !cpu->powered_off
&& cs->interrupt_request & && cs->interrupt_request &

View file

@ -3157,7 +3157,7 @@ uint32_t HELPER(rbit)(uint32_t x)
int arm_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw, int arm_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw,
int mmu_idx) int mmu_idx)
{ {
ARMCPU *cpu = ARM_CPU(cs); ARMCPU *cpu = ARM_CPU(NULL, cs);
CPUARMState *env = &cpu->env; CPUARMState *env = &cpu->env;
env->exception.vaddress = address; env->exception.vaddress = address;
@ -4335,7 +4335,7 @@ int arm_cpu_handle_mmu_fault(CPUState *cs, vaddr address,
hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
{ {
ARMCPU *cpu = ARM_CPU(env->uc, cs); ARMCPU *cpu = ARM_CPU(NULL, cs);
hwaddr phys_addr; hwaddr phys_addr;
target_ulong page_size; target_ulong page_size;
int prot; int prot;