2019-11-19 10:30:04 +00:00
|
|
|
#pragma once
|
2020-07-31 07:09:18 +00:00
|
|
|
#include "cpu_code_cache.h"
|
2019-12-28 04:04:15 +00:00
|
|
|
#include "cpu_types.h"
|
2019-11-19 10:30:04 +00:00
|
|
|
|
2019-12-28 04:04:15 +00:00
|
|
|
namespace CPU {
|
|
|
|
struct CodeBlockInstruction;
|
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
namespace Recompiler::Thunks {
|
2019-11-19 10:30:04 +00:00
|
|
|
|
2020-07-31 07:09:18 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// Trampolines for calling back from the JIT
|
|
|
|
// Needed because we can't cast member functions to void*...
|
|
|
|
// TODO: Abuse carry flag or something else for exception
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
bool InterpretInstruction();
|
|
|
|
|
|
|
|
// Memory access functions for the JIT - MSB is set on exception.
|
2020-08-08 05:15:56 +00:00
|
|
|
u64 ReadMemoryByte(u32 address);
|
|
|
|
u64 ReadMemoryHalfWord(u32 address);
|
|
|
|
u64 ReadMemoryWord(u32 address);
|
|
|
|
u32 WriteMemoryByte(u32 address, u8 value);
|
|
|
|
u32 WriteMemoryHalfWord(u32 address, u16 value);
|
|
|
|
u32 WriteMemoryWord(u32 address, u32 value);
|
2020-07-31 07:09:18 +00:00
|
|
|
|
|
|
|
} // namespace Recompiler::Thunks
|
2019-12-28 04:04:15 +00:00
|
|
|
|
|
|
|
} // namespace CPU
|