mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
use templates to only execute GDB stub related code if enabled
This commit is contained in:
25
src/ARM.h
25
src/ARM.h
@ -43,6 +43,15 @@ enum
|
||||
RWFlags_ForceUser = (1<<21),
|
||||
};
|
||||
|
||||
enum class CPUExecuteMode : u32
|
||||
{
|
||||
Interpreter,
|
||||
InterpreterGDB,
|
||||
#ifdef JIT_ENABLED
|
||||
JIT
|
||||
#endif
|
||||
};
|
||||
|
||||
struct GDBArgs;
|
||||
class ARMJIT;
|
||||
class GPU;
|
||||
@ -75,10 +84,6 @@ public:
|
||||
}
|
||||
|
||||
void NocashPrint(u32 addr) noexcept;
|
||||
virtual void Execute() = 0;
|
||||
#ifdef JIT_ENABLED
|
||||
virtual void ExecuteJIT() = 0;
|
||||
#endif
|
||||
|
||||
bool CheckCondition(u32 code) const
|
||||
{
|
||||
@ -241,10 +246,8 @@ public:
|
||||
void PrefetchAbort();
|
||||
void DataAbort();
|
||||
|
||||
void Execute() override;
|
||||
#ifdef JIT_ENABLED
|
||||
void ExecuteJIT() override;
|
||||
#endif
|
||||
template <CPUExecuteMode mode>
|
||||
void Execute();
|
||||
|
||||
// all code accesses are forced nonseq 32bit
|
||||
u32 CodeRead32(u32 addr, bool branch);
|
||||
@ -383,10 +386,8 @@ public:
|
||||
|
||||
void JumpTo(u32 addr, bool restorecpsr = false) override;
|
||||
|
||||
void Execute() override;
|
||||
#ifdef JIT_ENABLED
|
||||
void ExecuteJIT() override;
|
||||
#endif
|
||||
template <CPUExecuteMode mode>
|
||||
void Execute();
|
||||
|
||||
u16 CodeRead16(u32 addr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user