mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06: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:
@ -1282,9 +1282,9 @@ static void UpdateTLBEntry(const XCheckTLBFlag flag, UPTE_Hi pte2, const u32 add
|
|||||||
if (IsNoExceptionFlag(flag))
|
if (IsNoExceptionFlag(flag))
|
||||||
return;
|
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];
|
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.recent = index;
|
||||||
tlbe.paddr[index] = pte2.RPN << HW_PAGE_INDEX_SHIFT;
|
tlbe.paddr[index] = pte2.RPN << HW_PAGE_INDEX_SHIFT;
|
||||||
tlbe.pte[index] = pte2.Hex;
|
tlbe.pte[index] = pte2.Hex;
|
||||||
|
@ -54,7 +54,7 @@ struct TLBEntry
|
|||||||
u32 tag[TLB_WAYS] = {INVALID_TAG, INVALID_TAG};
|
u32 tag[TLB_WAYS] = {INVALID_TAG, INVALID_TAG};
|
||||||
u32 paddr[TLB_WAYS] = {};
|
u32 paddr[TLB_WAYS] = {};
|
||||||
u32 pte[TLB_WAYS] = {};
|
u32 pte[TLB_WAYS] = {};
|
||||||
u8 recent = 0;
|
u32 recent = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PairedSingle
|
struct PairedSingle
|
||||||
|
Reference in New Issue
Block a user