diff options
author | Artyom Tarasenko | 2016-03-02 14:01:20 +0100 |
---|---|---|
committer | Artyom Tarasenko | 2017-01-18 22:03:44 +0100 |
commit | e4d06ca74b751e486ca2a57f586fd4b858a13085 (patch) | |
tree | 143aa5f990e35aa596588c2b82e432c15aa1dc7c /target | |
parent | target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor mode (diff) | |
download | qemu-e4d06ca74b751e486ca2a57f586fd4b858a13085.tar.gz qemu-e4d06ca74b751e486ca2a57f586fd4b858a13085.tar.xz qemu-e4d06ca74b751e486ca2a57f586fd4b858a13085.zip |
target-sparc: simplify replace_tlb_entry by using TTE_PGSIZE
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/sparc/ldst_helper.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 20e202b5c8..7a134b3c0d 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; |