mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
JitArm64: Fastmem: fixup map & lookup
This commit is contained in:
@ -155,6 +155,8 @@ public:
|
|||||||
const Ref operator[](size_t bit) const { return (*const_cast<BitSet*>(this))[bit]; }
|
const Ref operator[](size_t bit) const { return (*const_cast<BitSet*>(this))[bit]; }
|
||||||
bool operator==(BitSet other) const { return m_val == other.m_val; }
|
bool operator==(BitSet other) const { return m_val == other.m_val; }
|
||||||
bool operator!=(BitSet other) const { return m_val != other.m_val; }
|
bool operator!=(BitSet other) const { return m_val != other.m_val; }
|
||||||
|
bool operator<(BitSet other) const { return m_val < other.m_val; }
|
||||||
|
bool operator>(BitSet other) const { return m_val > other.m_val; }
|
||||||
BitSet operator|(BitSet other) const { return BitSet(m_val | other.m_val); }
|
BitSet operator|(BitSet other) const { return BitSet(m_val | other.m_val); }
|
||||||
BitSet operator&(BitSet other) const { return BitSet(m_val & other.m_val); }
|
BitSet operator&(BitSet other) const { return BitSet(m_val & other.m_val); }
|
||||||
BitSet operator^(BitSet other) const { return BitSet(m_val ^ other.m_val); }
|
BitSet operator^(BitSet other) const { return BitSet(m_val ^ other.m_val); }
|
||||||
|
@ -185,11 +185,18 @@ private:
|
|||||||
u32 flags;
|
u32 flags;
|
||||||
bool operator< (const SlowmemHandler& rhs) const
|
bool operator< (const SlowmemHandler& rhs) const
|
||||||
{
|
{
|
||||||
return !(dest_reg == rhs.dest_reg &&
|
if (dest_reg < rhs.dest_reg) return true;
|
||||||
addr_reg == rhs.addr_reg &&
|
if (dest_reg > rhs.dest_reg) return false;
|
||||||
gprs == rhs.gprs &&
|
if (addr_reg < rhs.addr_reg) return true;
|
||||||
fprs == rhs.fprs &&
|
if (addr_reg > rhs.addr_reg) return false;
|
||||||
flags == rhs.flags);
|
if (gprs < rhs.gprs) return true;
|
||||||
|
if (gprs > rhs.gprs) return false;
|
||||||
|
if (fprs < rhs.fprs) return true;
|
||||||
|
if (fprs > rhs.fprs) return false;
|
||||||
|
if (flags < rhs.flags) return true;
|
||||||
|
if (flags > rhs.flags) return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -374,6 +374,9 @@ bool JitArm64::HandleFault(uintptr_t access_address, SContext* ctx)
|
|||||||
|
|
||||||
std::map<const u8*, std::pair<SlowmemHandler, const u8*>>::iterator slow_handler_iter = m_fault_to_handler.find((const u8*)ctx->CTX_PC);
|
std::map<const u8*, std::pair<SlowmemHandler, const u8*>>::iterator slow_handler_iter = m_fault_to_handler.find((const u8*)ctx->CTX_PC);
|
||||||
|
|
||||||
|
if (slow_handler_iter == m_fault_to_handler.end())
|
||||||
|
return false;
|
||||||
|
|
||||||
BackPatchInfo& info = m_backpatch_info[flags];
|
BackPatchInfo& info = m_backpatch_info[flags];
|
||||||
ARM64XEmitter emitter((u8*)(ctx->CTX_PC - info.m_fastmem_trouble_inst_offset * 4));
|
ARM64XEmitter emitter((u8*)(ctx->CTX_PC - info.m_fastmem_trouble_inst_offset * 4));
|
||||||
u64 new_pc = (u64)emitter.GetCodePtr();
|
u64 new_pc = (u64)emitter.GetCodePtr();
|
||||||
|
Reference in New Issue
Block a user