Merge pull request #11155 from lioncash/unsigned

HW: Use unsigned indices in RegisterMMIO where applicable
This commit is contained in:
Pokechu22 2022-10-11 11:54:42 -07:00 committed by GitHub
commit 0c09eb5686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -453,7 +453,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
MMIO::InvalidWrite<u16>());
// 32 bit reads/writes are a combination of two 16 bit accesses.
for (int i = 0; i < 0x1000; i += 4)
for (u32 i = 0; i < 0x1000; i += 4)
{
mmio->Register(base | i, MMIO::ReadToSmaller<u32>(mmio, base | i, base | (i + 2)),
MMIO::WriteToSmaller<u32>(mmio, base | i, base | (i + 2)));

View File

@ -142,7 +142,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
MMIO::InvalidWrite<u32>());
// 16 bit reads are based on 32 bit reads.
for (int i = 0; i < 0x1000; i += 4)
for (u32 i = 0; i < 0x1000; i += 4)
{
mmio->Register(base | i, MMIO::ReadToLarger<u16>(mmio, base | i, 16),
MMIO::InvalidWrite<u16>());

View File

@ -433,7 +433,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
}));
// Map 8 bit reads (not writes) to 16 bit reads.
for (int i = 0; i < 0x1000; i += 2)
for (u32 i = 0; i < 0x1000; i += 2)
{
mmio->Register(base | i, MMIO::ReadToLarger<u8>(mmio, base | i, 8), MMIO::InvalidWrite<u8>());
mmio->Register(base | (i + 1), MMIO::ReadToLarger<u8>(mmio, base | i, 0),
@ -441,7 +441,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
}
// Map 32 bit reads and writes to 16 bit reads and writes.
for (int i = 0; i < 0x1000; i += 4)
for (u32 i = 0; i < 0x1000; i += 4)
{
mmio->Register(base | i, MMIO::ReadToSmaller<u32>(mmio, base | i, base | (i + 2)),
MMIO::WriteToSmaller<u32>(mmio, base | i, base | (i + 2)));