Fix compilation issues on pedantic cpp compilers. (#783)
* Fix compilation issues on pedantic cpp compilers. * Avoid using fullblown static function.
This commit is contained in:
parent
9ac60a840a
commit
45ea1fa990
|
@ -594,7 +594,8 @@ void CompileBlock(ARM* cpu)
|
||||||
u32 r15 = cpu->R[15];
|
u32 r15 = cpu->R[15];
|
||||||
|
|
||||||
u32 addressRanges[Config::JIT_MaxBlockSize];
|
u32 addressRanges[Config::JIT_MaxBlockSize];
|
||||||
u32 addressMasks[Config::JIT_MaxBlockSize] = {0};
|
u32 addressMasks[Config::JIT_MaxBlockSize];
|
||||||
|
memset(addressMasks, 0, Config::JIT_MaxBlockSize * sizeof(u32));
|
||||||
u32 numAddressRanges = 0;
|
u32 numAddressRanges = 0;
|
||||||
|
|
||||||
u32 numLiterals = 0;
|
u32 numLiterals = 0;
|
||||||
|
|
|
@ -68,6 +68,11 @@ void Compiler::A_Comp_MRS()
|
||||||
MOV(rd, RCPSR);
|
MOV(rd, RCPSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateModeTrampoline(ARM* arm, u32 oldmode, u32 newmode)
|
||||||
|
{
|
||||||
|
arm->UpdateMode(oldmode, newmode);
|
||||||
|
}
|
||||||
|
|
||||||
void Compiler::A_Comp_MSR()
|
void Compiler::A_Comp_MSR()
|
||||||
{
|
{
|
||||||
Comp_AddCycles_C();
|
Comp_AddCycles_C();
|
||||||
|
@ -139,7 +144,7 @@ void Compiler::A_Comp_MSR()
|
||||||
|
|
||||||
PushRegs(true);
|
PushRegs(true);
|
||||||
|
|
||||||
QuickCallFunction(X3, (void*)&ARM::UpdateMode);
|
QuickCallFunction(X3, (void*)&UpdateModeTrampoline);
|
||||||
|
|
||||||
PopRegs(true);
|
PopRegs(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,7 @@ public:
|
||||||
void Comp_RegShiftReg(int op, bool S, Op2& op2, Arm64Gen::ARM64Reg rs);
|
void Comp_RegShiftReg(int op, bool S, Op2& op2, Arm64Gen::ARM64Reg rs);
|
||||||
|
|
||||||
bool Comp_MemLoadLiteral(int size, bool signExtend, int rd, u32 addr);
|
bool Comp_MemLoadLiteral(int size, bool signExtend, int rd, u32 addr);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
memop_Writeback = 1 << 0,
|
memop_Writeback = 1 << 0,
|
||||||
|
|
|
@ -101,6 +101,11 @@ void Compiler::A_Comp_MRS()
|
||||||
MOV(32, rd, R(RCPSR));
|
MOV(32, rd, R(RCPSR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateModeTrampoline(ARM* arm, u32 oldmode, u32 newmode)
|
||||||
|
{
|
||||||
|
arm->UpdateMode(oldmode, newmode);
|
||||||
|
}
|
||||||
|
|
||||||
void Compiler::A_Comp_MSR()
|
void Compiler::A_Comp_MSR()
|
||||||
{
|
{
|
||||||
Comp_AddCycles_C();
|
Comp_AddCycles_C();
|
||||||
|
@ -185,7 +190,7 @@ void Compiler::A_Comp_MSR()
|
||||||
MOV(32, R(ABI_PARAM3), R(RCPSR));
|
MOV(32, R(ABI_PARAM3), R(RCPSR));
|
||||||
MOV(32, R(ABI_PARAM2), R(RSCRATCH3));
|
MOV(32, R(ABI_PARAM2), R(RSCRATCH3));
|
||||||
MOV(64, R(ABI_PARAM1), R(RCPU));
|
MOV(64, R(ABI_PARAM1), R(RCPU));
|
||||||
CALL((void*)&ARM::UpdateMode);
|
CALL((void*)&UpdateModeTrampoline);
|
||||||
|
|
||||||
PopRegs(true);
|
PopRegs(true);
|
||||||
}
|
}
|
||||||
|
@ -896,5 +901,4 @@ void Compiler::Comp_AddCycles_CD()
|
||||||
else
|
else
|
||||||
ConstantCycles += cycles;
|
ConstantCycles += cycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue