diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-23 18:04:12 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-23 18:04:12 +0000 |
commit | e034e2c39aee1800101812045690e0575abb428b (patch) | |
tree | d549ba6b2d7b25cf83ab2995b9cee9266fc80f96 /target-mips/op.c | |
parent | 5c40d2bd4836636b762906bf1516c30b0ed5d74c (diff) | |
download | qemu-e034e2c39aee1800101812045690e0575abb428b.zip qemu-e034e2c39aee1800101812045690e0575abb428b.tar.gz qemu-e034e2c39aee1800101812045690e0575abb428b.tar.bz2 |
Handle MIPS64 SEGBITS value correctly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3011 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r-- | target-mips/op.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-mips/op.c b/target-mips/op.c index 66e27e2..715c355 100644 --- a/target-mips/op.c +++ b/target-mips/op.c @@ -1328,7 +1328,7 @@ void op_mtc0_entryhi (void) /* 1k pages not implemented */ val = T0 & ((TARGET_PAGE_MASK << 1) | 0xFF); #ifdef TARGET_MIPS64 - val = T0 & 0xC00000FFFFFFFFFFULL; + val &= env->SEGMask; #endif old = env->CP0_EntryHi; env->CP0_EntryHi = val; @@ -1526,7 +1526,8 @@ void op_mtc0_desave (void) #ifdef TARGET_MIPS64 void op_mtc0_xcontext (void) { - env->CP0_XContext = (env->CP0_XContext & 0x1ffffffffULL) | (T0 & ~0x1ffffffffULL); + target_ulong mask = (1ULL << (env->SEGBITS - 7)) - 1; + env->CP0_XContext = (env->CP0_XContext & mask) | (T0 & ~mask); RETURN(); } |