CPU/Recompiler: Write exception exits to far code buffer
Keeps the hot path nice and clean.
This commit is contained in:
@ -4,13 +4,18 @@
|
||||
class JitCodeBuffer
|
||||
{
|
||||
public:
|
||||
JitCodeBuffer(size_t size = 64 * 1024 * 1024);
|
||||
JitCodeBuffer(size_t size = 64 * 1024 * 1024, size_t far_code_size = 0);
|
||||
~JitCodeBuffer();
|
||||
|
||||
void Reset();
|
||||
|
||||
void* GetFreeCodePointer() const { return m_free_code_ptr; }
|
||||
size_t GetFreeCodeSpace() const { return (m_code_size - m_code_used); }
|
||||
void CommitCode(size_t length);
|
||||
void Reset();
|
||||
|
||||
void* GetFreeFarCodePointer() const { return m_free_far_code_ptr; }
|
||||
size_t GetFreeFarCodeSpace() const { return (m_far_code_size - m_far_code_used); }
|
||||
void CommitFarCode(size_t length);
|
||||
|
||||
/// Adjusts the free code pointer to the specified alignment, padding with bytes.
|
||||
/// Assumes alignment is a power-of-two.
|
||||
@ -21,5 +26,12 @@ private:
|
||||
void* m_free_code_ptr;
|
||||
size_t m_code_size;
|
||||
size_t m_code_used;
|
||||
|
||||
void* m_far_code_ptr;
|
||||
void* m_free_far_code_ptr;
|
||||
size_t m_far_code_size;
|
||||
size_t m_far_code_used;
|
||||
|
||||
size_t m_total_size;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user