mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
fix carry errors
This commit is contained in:
parent
acf955635f
commit
5a1ce28105
@ -2738,7 +2738,7 @@ private:
|
||||
{
|
||||
const u64 RA = CPU.GPR[ra];
|
||||
CPU.GPR[rd] = ~RA + CPU.XER.CA;
|
||||
CPU.XER.CA = (0x8000000000000000 & RA) && (0x8000000000000000 & CPU.GPR[rd]);//RA <= 0ull;
|
||||
CPU.XER.CA = (~RA + CPU.XER.CA > ~0x0) | ((RA == 0) & CPU.XER.CA);
|
||||
if (oe) ConLog.Warning("subfzeo");
|
||||
if (rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
}
|
||||
@ -2771,7 +2771,7 @@ private:
|
||||
{
|
||||
const u64 RA = CPU.GPR[ra];
|
||||
CPU.GPR[rd] = ~RA + CPU.XER.CA + 0xFFFFFFFFFFFFFFFF;
|
||||
CPU.XER.CA = !(0x8000000000000000 & RA) && !(0x8000000000000000 & CPU.GPR[rd]);
|
||||
CPU.XER.CA = (~RA + CPU.XER.CA > ~0xFFFFFFFFFFFFFFFF) | ((RA == 0) & CPU.XER.CA);
|
||||
if (oe) ConLog.Warning("subfmeo");
|
||||
if (rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user