Core: fix CX86RecompilerOps::CompileLoadMemoryValue Map_GPR_32bit when called from LWC1
This commit is contained in:
parent
48b3e5a9a2
commit
5e1a40fffb
|
@ -199,7 +199,7 @@ void R4300iInstruction::ReadsGPR(uint32_t & Reg1, uint32_t & Reg2) const
|
||||||
Reg2 = 0;
|
Reg2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t R4300iInstruction::WritesGPR(void) const
|
int32_t R4300iInstruction::WritesGPR(void) const
|
||||||
{
|
{
|
||||||
uint32_t op = m_Instruction.op;
|
uint32_t op = m_Instruction.op;
|
||||||
if (op == R4300i_SPECIAL)
|
if (op == R4300i_SPECIAL)
|
||||||
|
@ -226,7 +226,7 @@ uint32_t R4300iInstruction::WritesGPR(void) const
|
||||||
{
|
{
|
||||||
return 31; // RA
|
return 31; // RA
|
||||||
}
|
}
|
||||||
return (uint32_t)-1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool R4300iInstruction::ReadsHI() const
|
bool R4300iInstruction::ReadsHI() const
|
||||||
|
|
|
@ -18,7 +18,7 @@ public:
|
||||||
bool HasDelaySlot(void) const;
|
bool HasDelaySlot(void) const;
|
||||||
bool DelaySlotEffectsCompare(uint32_t DelayInstruction) const;
|
bool DelaySlotEffectsCompare(uint32_t DelayInstruction) const;
|
||||||
void ReadsGPR(uint32_t & Reg1, uint32_t & Reg2) const;
|
void ReadsGPR(uint32_t & Reg1, uint32_t & Reg2) const;
|
||||||
uint32_t WritesGPR(void) const;
|
int32_t WritesGPR(void) const;
|
||||||
bool ReadsHI() const;
|
bool ReadsHI() const;
|
||||||
bool ReadsLO() const;
|
bool ReadsLO() const;
|
||||||
bool WritesHI() const;
|
bool WritesHI() const;
|
||||||
|
|
|
@ -9771,7 +9771,7 @@ asmjit::x86::Gp CX86RecompilerOps::BaseOffsetAddress(bool UseBaseRegister)
|
||||||
|
|
||||||
void CX86RecompilerOps::CompileLoadMemoryValue(asmjit::x86::Gp & AddressReg, const asmjit::x86::Gp & ValueReg, const asmjit::x86::Gp & ValueRegHi, uint8_t ValueSize, bool SignExtend)
|
void CX86RecompilerOps::CompileLoadMemoryValue(asmjit::x86::Gp & AddressReg, const asmjit::x86::Gp & ValueReg, const asmjit::x86::Gp & ValueRegHi, uint8_t ValueSize, bool SignExtend)
|
||||||
{
|
{
|
||||||
if (ValueSize == 32 && m_Instruction.WritesGPR() != 0)
|
if (ValueSize == 32 && m_Instruction.WritesGPR() > 0)
|
||||||
{
|
{
|
||||||
m_RegWorkingSet.ProtectGPR(m_Opcode.base);
|
m_RegWorkingSet.ProtectGPR(m_Opcode.base);
|
||||||
m_RegWorkingSet.Map_GPR_32bit(m_Opcode.rt, true, m_Opcode.rt != m_Opcode.base ? -1 : m_Opcode.base);
|
m_RegWorkingSet.Map_GPR_32bit(m_Opcode.rt, true, m_Opcode.rt != m_Opcode.base ? -1 : m_Opcode.base);
|
||||||
|
|
Loading…
Reference in New Issue