Skip to contentSkip to conversation

[5284] Fix Xcontext fill, by Here Poussineau.

Qemu-devel Thiemo Seufer 1 participant 1 message Sep 21, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5284

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5284
Author:   ths
Date:     2008-09-21 21:21:26 +0000 (Sun, 21 Sep 2008)

Log Message:
-----------
Fix Xcontext fill, by Here Poussineau.

Modified Paths:
--------------
trunk/target-mips/helper.c

Modified: trunk/target-mips/helper.c
===================================================================

target-mips/helper.c +1 -1
@@ -304,7 +304,7 @@
 #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;