Commit a16b45e7484f90ef8b4b2ea0a476e0708bb300c6

Authored by aurel32
1 parent 83479693

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
Showing 1 changed file with 3 additions and 2 deletions
target-ppc/op_helper.c
... ... @@ -338,9 +338,10 @@ void helper_stsw(target_ulong addr, uint32_t nb, uint32_t reg)
338 338 addr = addr_add(addr, 4);
339 339 }
340 340 if (unlikely(nb > 0)) {
341   - for (sh = 24; nb > 0; nb--, sh -= 8)
  341 + for (sh = 24; nb > 0; nb--, sh -= 8) {
342 342 stb(addr, (env->gpr[reg] >> sh) & 0xFF);
343   - addr = addr_add(addr, 1);
  343 + addr = addr_add(addr, 1);
  344 + }
344 345 }
345 346 }
346 347  
... ...