diff --git a/src/core/cpu_recompiler_code_generator.cpp b/src/core/cpu_recompiler_code_generator.cpp index d31386526..45422e564 100644 --- a/src/core/cpu_recompiler_code_generator.cpp +++ b/src/core/cpu_recompiler_code_generator.cpp @@ -290,6 +290,17 @@ void CodeGenerator::ConvertValueSizeInPlace(Value* value, RegSize size, bool sig 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) { DebugAssert(lhs.size == rhs.size); @@ -1722,5 +1733,4 @@ bool CodeGenerator::Compile_cop2(const CodeBlockInstruction& cbi) return true; } } - } // namespace CPU::Recompiler diff --git a/src/core/cpu_recompiler_code_generator.h b/src/core/cpu_recompiler_code_generator.h index 85cd223c6..afb5ba8f0 100644 --- a/src/core/cpu_recompiler_code_generator.h +++ b/src/core/cpu_recompiler_code_generator.h @@ -159,6 +159,7 @@ private: void SwitchToFarCode(); void SwitchToNearCode(); + void* GetCurrentCodePointer() const; void* GetCurrentNearCodePointer() const; void* GetCurrentFarCodePointer() const;