From 9c67ef0cb545ff165bfdd077b93f608eceabe0d7 Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 21 Sep 2008 21:21:26 +0000 Subject: Fix Xcontext fill, by Here Poussineau. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5284 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-mips/helper.c') 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; -- cgit v1.2.1