mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
CPU/Recompiler: Add GetCurrentCodePointer()
This commit is contained in:
parent
390b6da0b8
commit
aabe5b9287
|
@ -290,6 +290,17 @@ void CodeGenerator::ConvertValueSizeInPlace(Value* value, RegSize size, bool sig
|
||||||
value->size = size;
|
value->size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* CodeGenerator::GetCurrentCodePointer() const
|
||||||
|
{
|
||||||
|
if (m_emit == &m_near_emitter)
|
||||||
|
return GetCurrentNearCodePointer();
|
||||||
|
else if (m_emit == &m_far_emitter)
|
||||||
|
return GetCurrentFarCodePointer();
|
||||||
|
|
||||||
|
Panic("unknown emitter");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
Value CodeGenerator::AddValues(const Value& lhs, const Value& rhs, bool set_flags)
|
Value CodeGenerator::AddValues(const Value& lhs, const Value& rhs, bool set_flags)
|
||||||
{
|
{
|
||||||
DebugAssert(lhs.size == rhs.size);
|
DebugAssert(lhs.size == rhs.size);
|
||||||
|
@ -1722,5 +1733,4 @@ bool CodeGenerator::Compile_cop2(const CodeBlockInstruction& cbi)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace CPU::Recompiler
|
} // namespace CPU::Recompiler
|
||||||
|
|
|
@ -159,6 +159,7 @@ private:
|
||||||
|
|
||||||
void SwitchToFarCode();
|
void SwitchToFarCode();
|
||||||
void SwitchToNearCode();
|
void SwitchToNearCode();
|
||||||
|
void* GetCurrentCodePointer() const;
|
||||||
void* GetCurrentNearCodePointer() const;
|
void* GetCurrentNearCodePointer() const;
|
||||||
void* GetCurrentFarCodePointer() const;
|
void* GetCurrentFarCodePointer() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue