Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ARM] Disable floating loadstores as they cause problems. Reenable fa…
…ddsx/fsubsx as it works with loadstores disabled.
  • Loading branch information
Sonicadvance1 committed Aug 19, 2013
1 parent 23ce6b9 commit 42de733
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
19 changes: 7 additions & 12 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitArm_FloatingPoint.cpp
Expand Up @@ -51,18 +51,15 @@ void JitArm::fabsx(UGeckoInstruction inst)
if (inst.Rc) Helper_UpdateCR1(vD);
}

// Broken in Crazy Taxi, sparks constantly fly from the car, messes with camera
void JitArm::faddsx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)

Default(inst); return;

ARMReg vD0 = fpr.R0(inst.FD);
ARMReg vD1 = fpr.R1(inst.FD);
ARMReg vA = fpr.R0(inst.FA);
ARMReg vB = fpr.R0(inst.FB);
ARMReg vD0 = fpr.R0(inst.FD);
ARMReg vD1 = fpr.R1(inst.FD);

VADD(vD0, vA, vB);
VMOV(vD1, vD0);
Expand All @@ -82,14 +79,11 @@ void JitArm::faddx(UGeckoInstruction inst)
if (inst.Rc) Helper_UpdateCR1(vD);
}

// Breaks Animal crossing
void JitArm::fsubsx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)

Default(inst); return;


ARMReg vA = fpr.R0(inst.FA);
ARMReg vB = fpr.R0(inst.FB);
ARMReg vD0 = fpr.R0(inst.FD);
Expand All @@ -112,14 +106,15 @@ void JitArm::fsubx(UGeckoInstruction inst)
VSUB(vD, vA, vB);
if (inst.Rc) Helper_UpdateCR1(vD);
}
// Breaks animal crossing

// Breaks Animal Crossing
void JitArm::fmulsx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)

Default(inst); return;

ARMReg vA = fpr.R0(inst.FA);
ARMReg vC = fpr.R0(inst.FC);
ARMReg vD0 = fpr.R0(inst.FD);
Expand Down
Expand Up @@ -37,6 +37,7 @@ void JitArm::lfs(UGeckoInstruction inst)
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)

Default(inst); return;
ARMReg rA = gpr.GetReg();
ARMReg rB = gpr.GetReg();
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
Expand All @@ -52,8 +53,8 @@ void JitArm::lfs(UGeckoInstruction inst)
else
MOVI2R(rB, (u32)inst.SIMM_16);

ARMReg v0 = fpr.R0(inst.FD, false);
ARMReg v1 = fpr.R1(inst.FD, false);
ARMReg v0 = fpr.R0(inst.FD);
ARMReg v1 = fpr.R1(inst.FD);

MOVI2R(rA, (u32)&Memory::Read_F32);
PUSH(4, R0, R1, R2, R3);
Expand All @@ -71,6 +72,7 @@ void JitArm::lfd(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
Default(inst); return;

ARMReg rA = gpr.GetReg();
ARMReg rB = gpr.GetReg();
Expand All @@ -87,7 +89,7 @@ void JitArm::lfd(UGeckoInstruction inst)
else
MOVI2R(rB, (u32)inst.SIMM_16);

ARMReg v0 = fpr.R0(inst.FD, false);
ARMReg v0 = fpr.R0(inst.FD);

MOVI2R(rA, (u32)&Memory::Read_F64);
PUSH(4, R0, R1, R2, R3);
Expand Down

0 comments on commit 42de733

Please sign in to comment.