mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Espresso: fix stwcx. CR0[SO] update and make IML instructions trivially copyable
- stwcx. loaded the summary-overflow source from CR0[SO] instead of XER[SO], making the subsequent CR0[SO] assignment a no-op. Other compare paths already read XER[SO] correctly. - Default the IMLReg/IMLInstruction copy constructors so IMLInstruction becomes trivially copyable, letting the IML instruction vectors relocate with memmove instead of per-element copies.
This commit is contained in:
parent
44c19af7db
commit
70e92b8850
@ -47,7 +47,7 @@ public:
|
||||
//m_raw |= (uint32)regId;
|
||||
}
|
||||
|
||||
IMLReg(const IMLReg& other) : m_raw(other.m_raw) {}
|
||||
IMLReg(const IMLReg& other) = default;
|
||||
|
||||
IMLRegFormat GetBaseFormat() const
|
||||
{
|
||||
@ -351,10 +351,7 @@ struct IMLUsedRegisters
|
||||
struct IMLInstruction
|
||||
{
|
||||
IMLInstruction() {}
|
||||
IMLInstruction(const IMLInstruction& other)
|
||||
{
|
||||
memcpy(this, &other, sizeof(IMLInstruction));
|
||||
}
|
||||
IMLInstruction(const IMLInstruction& other) = default;
|
||||
|
||||
uint8 type;
|
||||
uint8 operation;
|
||||
|
||||
@ -1545,7 +1545,7 @@ bool PPCRecompilerImlGen_STWCX(ppcImlGenContext_t* ppcImlGenContext, uint32 opco
|
||||
IMLReg regCrGT = _GetRegCR(ppcImlGenContext, 0, Espresso::CR_BIT_INDEX_GT);
|
||||
IMLReg regCrEQ = _GetRegCR(ppcImlGenContext, 0, Espresso::CR_BIT_INDEX_EQ);
|
||||
IMLReg regCrSO = _GetRegCR(ppcImlGenContext, 0, Espresso::CR_BIT_INDEX_SO);
|
||||
IMLReg regXerSO = _GetRegCR(ppcImlGenContext, 0, Espresso::CR_BIT_INDEX_SO);
|
||||
IMLReg regXerSO = PPCRecompilerImlGen_loadRegister(ppcImlGenContext, PPCREC_NAME_XER_SO);
|
||||
ppcImlGenContext->emitInst().make_r_s32(PPCREC_IML_OP_ASSIGN, regCrLT, 0);
|
||||
ppcImlGenContext->emitInst().make_r_s32(PPCREC_IML_OP_ASSIGN, regCrGT, 0);
|
||||
ppcImlGenContext->emitInst().make_r_r(PPCREC_IML_OP_ASSIGN, regCrSO, regXerSO);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user