]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target-mips/op.c
Full MIPS64 MMU implementation, by Aurelien Jarno.
[mirror_qemu.git] / target-mips / op.c
index a820aad7b4748eea10eec044c19e80d47297465e..ddc3cdea5943814cbc0953e8d24b922f3f6387d0 100644 (file)
@@ -1317,8 +1317,10 @@ void op_mtc0_entryhi (void)
     target_ulong old, val;
 
     /* 1k pages not implemented */
-    /* Ignore MIPS64 TLB for now */
-    val = (target_ulong)(int32_t)T0 & ~(target_ulong)0x1F00;
+    val = T0 & ((TARGET_PAGE_MASK << 1) | 0xFF);
+#ifdef TARGET_MIPS64
+    val = T0 & 0xC00000FFFFFFFFFFULL;
+#endif
     old = env->CP0_EntryHi;
     env->CP0_EntryHi = val;
     /* If the ASID changes, flush qemu's TLB.  */