Skip to content

Commit

Permalink
Fix compilation on GCC11 or later.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Jul 12, 2023
1 parent ba1180b commit e824630
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/SysVita/DynaRec/CodeGeneratorARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ bool CCodeGeneratorARM::GenerateCACHE( EN64Reg base, s16 offset, u32 cache_op )
if(dwCache == 0 && (dwAction == 0 || dwAction == 4))
{
FlushAllRegisters(mRegisterCache, true);
LDR(ArmReg_R0, ArmReg_R12, offsetof(SCPUState, CPU[base]._u32_0));
LDR(ArmReg_R0, ArmReg_R12, offsetof(SCPUState, CPU[0]._u32_0) + sizeof(SCPUState::CPU[0]) * base);
MOV32(ArmReg_R1, offset);
ADD(ArmReg_R0, ArmReg_R0, ArmReg_R1);
MOV_IMM(ArmReg_R1, 0x20);
Expand Down Expand Up @@ -3039,7 +3039,7 @@ void CCodeGeneratorARM::GenerateCFC1( EN64Reg rt, u32 fs )
if ( fs == 0 || fs == 31 )
{
EArmReg regt = GetRegisterNoLoadLo(rt, ArmReg_R0);
LDR(regt, ArmReg_R12, offsetof(SCPUState, FPUControl[fs]._s32));
LDR(regt, ArmReg_R12, offsetof(SCPUState, FPUControl[0]._s32) + sizeof(SCPUState::FPUControl[0]) * fs);

UpdateRegister(rt, regt, URO_HI_SIGN_EXTEND);
}
Expand All @@ -3050,6 +3050,6 @@ void CCodeGeneratorARM::GenerateCTC1( u32 fs, EN64Reg rt )
if ( fs == 31 )
{
EArmReg regt = GetRegisterAndLoadLo(rt, ArmReg_R0);
STR(regt, ArmReg_R12, offsetof(SCPUState, FPUControl[fs]._u32));
STR(regt, ArmReg_R12, offsetof(SCPUState, FPUControl[31]._u32));
}
}

0 comments on commit e824630

Please sign in to comment.