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
This commit is contained in:
aurel32 2008-12-29 09:46:58 +00:00
parent 83479693cc
commit a16b45e748
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}
}
}