mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
MMU: Remove implicit sign conversions and truncation in UpdateTLBEntry
These are trivial to resolve. Converting the structure member into a u32 results in no increase in structure size, as it's making use of the three extra padding bits in the structure.
This commit is contained in:
parent
c008b1c335
commit
3216040bfe
@ -1282,9 +1282,9 @@ static void UpdateTLBEntry(const XCheckTLBFlag flag, UPTE_Hi pte2, const u32 add
|
||||
if (IsNoExceptionFlag(flag))
|
||||
return;
|
||||
|
||||
const int tag = address >> HW_PAGE_INDEX_SHIFT;
|
||||
const u32 tag = address >> HW_PAGE_INDEX_SHIFT;
|
||||
TLBEntry& tlbe = ppcState.tlb[IsOpcodeFlag(flag)][tag & HW_PAGE_INDEX_MASK];
|
||||
const int index = tlbe.recent == 0 && tlbe.tag[0] != TLBEntry::INVALID_TAG;
|
||||
const u32 index = tlbe.recent == 0 && tlbe.tag[0] != TLBEntry::INVALID_TAG;
|
||||
tlbe.recent = index;
|
||||
tlbe.paddr[index] = pte2.RPN << HW_PAGE_INDEX_SHIFT;
|
||||
tlbe.pte[index] = pte2.Hex;
|
||||
|
@ -54,7 +54,7 @@ struct TLBEntry
|
||||
u32 tag[TLB_WAYS] = {INVALID_TAG, INVALID_TAG};
|
||||
u32 paddr[TLB_WAYS] = {};
|
||||
u32 pte[TLB_WAYS] = {};
|
||||
u8 recent = 0;
|
||||
u32 recent = 0;
|
||||
};
|
||||
|
||||
struct PairedSingle
|
||||
|
Loading…
x
Reference in New Issue
Block a user