On 9/3/25 10:48, Bibo Mao wrote:
With function helper_tlbfill(), since there is no suitable TLB entry,
new TLB will be added and invalidate one old TLB entry. The old TLB
entry index is selected randomly, instead it can be optimized as
following:
1. invalid TLB entry can be selected at first.
2. TLB entry with other ASID can be selected secondly
3. random method is used by last.
Signed-off-by: Bibo Mao<[email protected]>
---
target/loongarch/tcg/tlb_helper.c | 49 ++++++++++++++++++++++++++-----
1 file changed, 42 insertions(+), 7 deletions(-)
Reviewed-by: Richard Henderson <[email protected]>
r~