aboutsummaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-21 21:21:26 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-21 21:21:26 +0000
commit9c67ef0cb545ff165bfdd077b93f608eceabe0d7 (patch)
tree8a78ae442fce22faeed27cde68884899434f0fb6 /target-mips/helper.c
parentab508019a15b3f5ecf3d5a8adf16ce7a7e02f9f8 (diff)
Fix Xcontext fill, by Here Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5284 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index b3790217f1..9340ad0123 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -304,7 +304,7 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
#if defined(TARGET_MIPS64)
env->CP0_EntryHi &= env->SEGMask;
env->CP0_XContext = (env->CP0_XContext & ((~0ULL) << (env->SEGBITS - 7))) |
- ((address & 0xC00000000000ULL) >> (env->SEGBITS - 9)) |
+ ((address & 0xC00000000000ULL) >> (55 - env->SEGBITS)) |
((address & ((1ULL << env->SEGBITS) - 1) & 0xFFFFFFFFFFFFE000ULL) >> 9);
#endif
env->exception_index = exception;