mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
Fix FIQ bank switching.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1786 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
d80cfb3f70
commit
8637c67fc5
@ -138,10 +138,10 @@ void switch_mode(CPUState *env, int mode)
|
||||
|
||||
if (old_mode == ARM_CPU_MODE_FIQ) {
|
||||
memcpy (env->fiq_regs, env->regs + 8, 5 * sizeof(uint32_t));
|
||||
memcpy (env->regs, env->usr_regs + 8, 5 * sizeof(uint32_t));
|
||||
memcpy (env->regs + 8, env->usr_regs, 5 * sizeof(uint32_t));
|
||||
} else if (mode == ARM_CPU_MODE_FIQ) {
|
||||
memcpy (env->usr_regs, env->regs + 8, 5 * sizeof(uint32_t));
|
||||
memcpy (env->regs, env->fiq_regs + 8, 5 * sizeof(uint32_t));
|
||||
memcpy (env->regs + 8, env->fiq_regs, 5 * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
i = bank_number(old_mode);
|
||||
|
Loading…
Reference in New Issue
Block a user