PowerPC/Interpreter: Avoid sign conversion with utility functions

Given we're operating with flags and bit representations, lets avoid
signed values here. It lessens the amount of sign conversion warnings
and lessens the amount of things to think about screwing you over when
making changes to the interpreter among other things.
This commit is contained in:
Lioncash
2018-05-16 21:30:15 -04:00
parent 5b96abf7aa
commit 3f19aa6469
5 changed files with 41 additions and 39 deletions

View File

@@ -47,7 +47,7 @@ static void InvalidateCacheThreadSafe(u64 userdata, s64 cyclesLate)
u32 CompactCR()
{
u32 new_cr = 0;
for (int i = 0; i < 8; i++)
for (u32 i = 0; i < 8; i++)
{
new_cr |= GetCRField(i) << (28 - i * 4);
}
@@ -56,7 +56,7 @@ u32 CompactCR()
void ExpandCR(u32 cr)
{
for (int i = 0; i < 8; i++)
for (u32 i = 0; i < 8; i++)
{
SetCRField(i, (cr >> (28 - i * 4)) & 0xF);
}