mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/nios2: Use hw/registerfields.h for CR_TLBADDR fields
Use FIELD_EX32 and FIELD_DP32 instead of manual manipulation of the fields. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220421151735.31996-27-richard.henderson@linaro.org>
This commit is contained in:
parent
bf754c96b2
commit
0a1fc63043
4 changed files with 16 additions and 15 deletions
|
@ -286,8 +286,8 @@ bool nios2_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
|||
} else {
|
||||
env->ctrl[CR_TLBMISC] |= CR_TLBMISC_D;
|
||||
}
|
||||
env->ctrl[CR_PTEADDR] &= CR_PTEADDR_PTBASE_MASK;
|
||||
env->ctrl[CR_PTEADDR] |= (address >> 10) & CR_PTEADDR_VPN_MASK;
|
||||
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];
|
||||
|
||||
cs->exception_index = excp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue