mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-25 02:49:08 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user