Message ID | 65e7ea6ea1cd0ebf291b1ed76d5cb1cccff2d49e.1484165352.git.atar4qemu@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 043cbf8..68eca86 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -127,9 +127,8 @@ static void replace_tlb_entry(SparcTLBEntry *tlb, if (TTE_IS_VALID(tlb->tte)) { CPUState *cs = CPU(sparc_env_get_cpu(env1)); - mask = 0xffffffffffffe000ULL; - mask <<= 3 * ((tlb->tte >> 61) & 3); - size = ~mask + 1; + size = 8192ULL << 3 * TTE_PGSIZE(tlb->tte); + mask = 1ULL + ~size; va = tlb->tag & mask;