mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
JitArm64: Fastmem: fixup map & lookup
This commit is contained in:
parent
bb39ba1f3a
commit
878f919f63
@ -155,6 +155,8 @@ public:
|
||||
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; }
|
||||
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;
|
||||
bool operator< (const SlowmemHandler& rhs) const
|
||||
{
|
||||
return !(dest_reg == rhs.dest_reg &&
|
||||
addr_reg == rhs.addr_reg &&
|
||||
gprs == rhs.gprs &&
|
||||
fprs == rhs.fprs &&
|
||||
flags == rhs.flags);
|
||||
if (dest_reg < rhs.dest_reg) return true;
|
||||
if (dest_reg > rhs.dest_reg) return false;
|
||||
if (addr_reg < rhs.addr_reg) return true;
|
||||
if (addr_reg > rhs.addr_reg) return false;
|
||||
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);
|
||||
|
||||
if (slow_handler_iter == m_fault_to_handler.end())
|
||||
return false;
|
||||
|
||||
BackPatchInfo& info = m_backpatch_info[flags];
|
||||
ARM64XEmitter emitter((u8*)(ctx->CTX_PC - info.m_fastmem_trouble_inst_offset * 4));
|
||||
u64 new_pc = (u64)emitter.GetCodePtr();
|
||||
|
Loading…
Reference in New Issue
Block a user