diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-14 14:20:32 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-14 14:20:32 +0000 |
commit | 8637c67fc56c70a029c8f4c2ca99e2c89e804703 (patch) | |
tree | bd9ade4b6930249866c68ae8e1098d90fd7459f2 /target-arm/helper.c | |
parent | d80cfb3f705e88b1074f3b781c476618d2d24c0e (diff) |
Fix FIQ bank switching.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1786 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index d0cd6d8e54..60eee5c2c8 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -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); |