diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-29 09:46:58 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-29 09:46:58 +0000 |
commit | a16b45e7484f90ef8b4b2ea0a476e0708bb300c6 (patch) | |
tree | 95731f72a3b28805be43c38539773a9b005ab80a | |
parent | 83479693cc4898b6e5669f4aee1f2683bcb0430d (diff) |
target-ppc: fix stsw/stswi instructions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6138 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-ppc/op_helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 1b0fe7e987..922060bcca 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -338,9 +338,10 @@ void helper_stsw(target_ulong addr, uint32_t nb, uint32_t reg) addr = addr_add(addr, 4); } if (unlikely(nb > 0)) { - for (sh = 24; nb > 0; nb--, sh -= 8) + for (sh = 24; nb > 0; nb--, sh -= 8) { stb(addr, (env->gpr[reg] >> sh) & 0xFF); - addr = addr_add(addr, 1); + addr = addr_add(addr, 1); + } } } |