mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/nios2: Use hw/registerfields.h for CR_TLBMISC fields
Use FIELD_EX32 and FIELD_DP32 instead of managing the masking by hand. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220421151735.31996-30-richard.henderson@linaro.org>
This commit is contained in:
parent
8036281527
commit
17c20fe3c8
4 changed files with 39 additions and 34 deletions
|
@ -281,11 +281,8 @@ bool nios2_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (access_type == MMU_INST_FETCH) {
|
||||
env->ctrl[CR_TLBMISC] &= ~CR_TLBMISC_D;
|
||||
} else {
|
||||
env->ctrl[CR_TLBMISC] |= CR_TLBMISC_D;
|
||||
}
|
||||
env->ctrl[CR_TLBMISC] = FIELD_DP32(env->ctrl[CR_TLBMISC], CR_TLBMISC, D,
|
||||
access_type != MMU_INST_FETCH);
|
||||
env->ctrl[CR_PTEADDR] = FIELD_DP32(env->ctrl[CR_PTEADDR], CR_PTEADDR, VPN,
|
||||
address >> TARGET_PAGE_BITS);
|
||||
env->mmu.pteaddr_wr = env->ctrl[CR_PTEADDR];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue