mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
Refactor the JIT to be object-oriented (#1879)
* Move TinyVector to a new file - So it's less sensitive to #include ordering * Forgot to include assert.h * Refactor ARMJIT_Memory into an object * Oops, forgot a declaration * Refactor ARMJIT to be contained in an object * Remove an unused function declaration * Add a missing #include * Remove a now-unused global * Use ARMJIT_Memory's own memory access functions * Fix some omissions in the ARM JIT * Move libandroid to be a member of ARMJIT_Memory instead of a global * Default-initialize most fields in ARMJIT_Compiler.h * Define NOOP_IF_NO_JIT * Finish refactoring the JIT to be object-oriented
This commit is contained in:

committed by
GitHub

parent
f2d7a29015
commit
544fefa27f
15
src/ARM.h
15
src/ARM.h
@ -42,18 +42,24 @@ enum
|
||||
const u32 ITCMPhysicalSize = 0x8000;
|
||||
const u32 DTCMPhysicalSize = 0x4000;
|
||||
|
||||
namespace ARMJIT
|
||||
{
|
||||
class ARMJIT;
|
||||
}
|
||||
namespace Melon
|
||||
{
|
||||
class GPU;
|
||||
}
|
||||
|
||||
class ARMJIT_Memory;
|
||||
|
||||
class ARM
|
||||
#ifdef GDBSTUB_ENABLED
|
||||
: public Gdb::StubCallbacks
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
ARM(u32 num, Melon::GPU& gpu);
|
||||
ARM(u32 num, ARMJIT::ARMJIT& jit, Melon::GPU& gpu);
|
||||
virtual ~ARM(); // destroy shit
|
||||
|
||||
virtual void Reset();
|
||||
@ -179,11 +185,12 @@ public:
|
||||
u64* FastBlockLookup;
|
||||
#endif
|
||||
|
||||
static u32 ConditionTable[16];
|
||||
static const u32 ConditionTable[16];
|
||||
#ifdef GDBSTUB_ENABLED
|
||||
Gdb::GdbStub GdbStub;
|
||||
#endif
|
||||
|
||||
ARMJIT::ARMJIT& JIT;
|
||||
protected:
|
||||
u8 (*BusRead8)(u32 addr);
|
||||
u16 (*BusRead16)(u32 addr);
|
||||
@ -221,7 +228,7 @@ private:
|
||||
class ARMv5 : public ARM
|
||||
{
|
||||
public:
|
||||
ARMv5(Melon::GPU& gpu);
|
||||
ARMv5(ARMJIT::ARMJIT& jit, Melon::GPU& gpu);
|
||||
~ARMv5();
|
||||
|
||||
void Reset() override;
|
||||
@ -365,7 +372,7 @@ public:
|
||||
class ARMv4 : public ARM
|
||||
{
|
||||
public:
|
||||
ARMv4(Melon::GPU& gpu);
|
||||
ARMv4(ARMJIT::ARMJIT& jit, Melon::GPU& gpu);
|
||||
|
||||
void Reset() override;
|
||||
|
||||
|
Reference in New Issue
Block a user