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-unicore32/helper.c | |
parent | bb0e627a84752707e629fde5534558ac08e7c521 (diff) |
exec: Change cpu_abort() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-unicore32/helper.c')
-rw-r--r-- | target-unicore32/helper.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c index 29cf5755bc..195e1bfca9 100644 --- a/target-unicore32/helper.c +++ b/target-unicore32/helper.c @@ -229,26 +229,22 @@ void helper_cp1_putc(target_ulong x) #ifdef CONFIG_USER_ONLY void switch_mode(CPUUniCore32State *env, int mode) { + UniCore32CPU *cpu = uc32_env_get_cpu(env); + if (mode != ASR_MODE_USER) { - cpu_abort(env, "Tried to switch out of user mode\n"); + cpu_abort(CPU(cpu), "Tried to switch out of user mode\n"); } } void uc32_cpu_do_interrupt(CPUState *cs) { - UniCore32CPU *cpu = UNICORE32_CPU(cs); - CPUUniCore32State *env = &cpu->env; - - cpu_abort(env, "NO interrupt in user mode\n"); + cpu_abort(cs, "NO interrupt in user mode\n"); } int uc32_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int access_type, int mmu_idx) { - UniCore32CPU *cpu = UNICORE32_CPU(cs); - CPUUniCore32State *env = &cpu->env; - - cpu_abort(env, "NO mmu fault in user mode\n"); + cpu_abort(cs, "NO mmu fault in user mode\n"); return 1; } #endif |