diff options
author | Andreas Färber <afaerber@suse.de> | 2013-09-03 17:38:47 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-13 19:52:28 +0100 |
commit | a47dddd7348d3e75ad650ef5e2ca9c3b13a600ac (patch) | |
tree | d07f7224ffb752c2bdae0add3ed683ccbb3c7c48 /target-sh4/helper.c | |
parent | bb0e627a84752707e629fde5534558ac08e7c521 (diff) | |
download | qemu-a47dddd7348d3e75ad650ef5e2ca9c3b13a600ac.tar.gz qemu-a47dddd7348d3e75ad650ef5e2ca9c3b13a600ac.tar.bz2 qemu-a47dddd7348d3e75ad650ef5e2ca9c3b13a600ac.zip |
exec: Change cpu_abort() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-sh4/helper.c')
-rw-r--r-- | target-sh4/helper.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 0357cebb81..ba0f269f52 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -234,15 +234,21 @@ static void update_itlb_use(CPUSH4State * env, int itlbnb) static int itlb_replacement(CPUSH4State * env) { - if ((env->mmucr & 0xe0000000) == 0xe0000000) + SuperHCPU *cpu = sh_env_get_cpu(env); + + if ((env->mmucr & 0xe0000000) == 0xe0000000) { return 0; - if ((env->mmucr & 0x98000000) == 0x18000000) + } + if ((env->mmucr & 0x98000000) == 0x18000000) { return 1; - if ((env->mmucr & 0x54000000) == 0x04000000) + } + if ((env->mmucr & 0x54000000) == 0x04000000) { return 2; - if ((env->mmucr & 0x2c000000) == 0x00000000) + } + if ((env->mmucr & 0x2c000000) == 0x00000000) { return 3; - cpu_abort(env, "Unhandled itlb_replacement"); + } + cpu_abort(CPU(cpu), "Unhandled itlb_replacement"); } /* Find the corresponding entry in the right TLB @@ -498,7 +504,7 @@ int superh_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw, cs->exception_index = 0x100; break; default: - cpu_abort(env, "Unhandled MMU fault"); + cpu_abort(cs, "Unhandled MMU fault"); } return 1; } @@ -522,6 +528,7 @@ hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) void cpu_load_tlb(CPUSH4State * env) { + SuperHCPU *cpu = sh_env_get_cpu(env); int n = cpu_mmucr_urc(env->mmucr); tlb_t * entry = &env->utlb[n]; @@ -551,7 +558,7 @@ void cpu_load_tlb(CPUSH4State * env) entry->size = 1024 * 1024; /* 1M */ break; default: - cpu_abort(env, "Unhandled load_tlb"); + cpu_abort(CPU(cpu), "Unhandled load_tlb"); break; } entry->sh = (uint8_t)cpu_ptel_sh(env->ptel); |