target-ppc: fix mtfsf and mtfsfi instructions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6035 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
aurel32 2008-12-15 00:30:28 +00:00
parent 9a819377d8
commit 27ee5df007
1 changed files with 3 additions and 3 deletions

View File

@ -986,9 +986,9 @@ void helper_store_fpscr (uint64_t arg, uint32_t mask)
prev = env->fpscr;
new = (uint32_t)arg;
new &= ~0x90000000;
new |= prev & 0x90000000;
for (i = 0; i < 7; i++) {
new &= ~0x60000000;
new |= prev & 0x60000000;
for (i = 0; i < 8; i++) {
if (mask & (1 << i)) {
env->fpscr &= ~(0xF << (4 * i));
env->fpscr |= new & (0xF << (4 * i));