summary refs log tree commit diff stats
path: root/target/mips/tcg/system/tlb_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/mips/tcg/system/tlb_helper.c')
-rw-r--r--target/mips/tcg/system/tlb_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/tlb_helper.c
index eccaf3624c..1e8901556d 100644
--- a/target/mips/tcg/system/tlb_helper.c
+++ b/target/mips/tcg/system/tlb_helper.c
@@ -652,7 +652,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr,
         return 0;
     }
 
-    if ((entry & (1 << psn)) && hugepg) {
+    if (extract64(entry, psn, 1) && hugepg) {
         *huge_page = true;
         *hgpg_directory_hit = true;
         entry = get_tlb_entry_layout(env, entry, leaf_mop, pf_ptew);