diff options
author | Blue Swirl | 2012-09-08 14:58:13 +0200 |
---|---|---|
committer | Blue Swirl | 2012-11-10 14:49:20 +0100 |
commit | 447b3b60d15e1db6967a19e40284d33136a7c9e7 (patch) | |
tree | 1c3b3daf3409c24db0653a67425cf2a4a5d9b30d /target-unicore32 | |
parent | kvm: avoid using cpu_single_env (diff) | |
download | qemu-447b3b60d15e1db6967a19e40284d33136a7c9e7.tar.gz qemu-447b3b60d15e1db6967a19e40284d33136a7c9e7.tar.xz qemu-447b3b60d15e1db6967a19e40284d33136a7c9e7.zip |
target-unicore32: avoid using cpu_single_env
Pass around CPUArchState instead of using global cpu_single_env.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-unicore32')
-rw-r--r-- | target-unicore32/softmmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target-unicore32/softmmu.c b/target-unicore32/softmmu.c index 9c2c54cbc8..fc27100f27 100644 --- a/target-unicore32/softmmu.c +++ b/target-unicore32/softmmu.c @@ -31,7 +31,7 @@ /* Map CPU modes onto saved register banks. */ -static inline int bank_number(int mode) +static inline int bank_number(CPUUniCore32State *env, int mode) { switch (mode) { case ASR_MODE_USER: @@ -46,7 +46,7 @@ static inline int bank_number(int mode) case ASR_MODE_INTR: return 4; } - cpu_abort(cpu_single_env, "Bad mode %x\n", mode); + cpu_abort(env, "Bad mode %x\n", mode); return -1; } @@ -60,12 +60,12 @@ void switch_mode(CPUUniCore32State *env, int mode) return; } - i = bank_number(old_mode); + i = bank_number(env, old_mode); env->banked_r29[i] = env->regs[29]; env->banked_r30[i] = env->regs[30]; env->banked_bsr[i] = env->bsr; - i = bank_number(mode); + i = bank_number(env, mode); env->regs[29] = env->banked_r29[i]; env->regs[30] = env->banked_r30[i]; env->bsr = env->banked_bsr[i]; |