summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-01-11 14:21:58 +0100
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-01-14 14:41:53 +0100
commitf25359cd87d181ceb62875aa893eed7d241418ad (patch)
tree41473f8c7a359cc5ccbfde8d66db0ef782f77fb5
parent96560cb34c3183a4fb1769e4eff4d860a24579a8 (diff)
downloadfocaccia-qemu-f25359cd87d181ceb62875aa893eed7d241418ad.tar.gz
focaccia-qemu-f25359cd87d181ceb62875aa893eed7d241418ad.zip
ppc-40x: Get TLB attributes from TLBLO.
The ZSEL was incorrectly beeing decoded from TLBHI. Decode it from
TLBLO instead.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
-rw-r--r--target-ppc/op_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index cea27f2b4d..3575b29317 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -3990,7 +3990,6 @@ void helper_4xx_tlbwe_hi (target_ulong entry, target_ulong val)
         cpu_abort(env, "Little-endian TLB entries are not supported by now\n");
     }
     tlb->PID = env->spr[SPR_40x_PID]; /* PID */
-    tlb->attr = val & 0xFF;
     LOG_SWTLB("%s: set up TLB %d RPN " TARGET_FMT_plx " EPN " TARGET_FMT_lx
               " size " TARGET_FMT_lx " prot %c%c%c%c PID %d\n", __func__,
               (int)entry, tlb->RPN, tlb->EPN, tlb->size,
@@ -4016,6 +4015,7 @@ void helper_4xx_tlbwe_lo (target_ulong entry, target_ulong val)
               val);
     entry &= 0x3F;
     tlb = &env->tlb[entry].tlbe;
+    tlb->attr = val & 0xFF;
     tlb->RPN = val & 0xFFFFFC00;
     tlb->prot = PAGE_READ;
     if (val & 0x200)