]> Git Repo - qemu.git/commitdiff
target-sparc: simplify replace_tlb_entry by using TTE_PGSIZE
authorArtyom Tarasenko <[email protected]>
Wed, 2 Mar 2016 13:01:20 +0000 (14:01 +0100)
committerArtyom Tarasenko <[email protected]>
Wed, 18 Jan 2017 21:03:44 +0000 (22:03 +0100)
Signed-off-by: Artyom Tarasenko <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
target/sparc/ldst_helper.c

index 20e202b5c8ec2715f9f8b3946e0c970848608df1..7a134b3c0da0a85f702bcbafdc22c68cf7ee1653 100644 (file)
@@ -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;
 
This page took 0.028677 seconds and 4 git commands to generate.