JIT: implemented most ALU instructions

This commit is contained in:
RSDuck
2019-06-25 17:09:27 +02:00
parent c692287eba
commit 2f6b46fd4f
8 changed files with 881 additions and 166 deletions

View File

@ -3,8 +3,6 @@
#include "types.h"
#include <string.h>
#include "ARM.h"
#include "ARM_InstrInfo.h"
@ -13,14 +11,6 @@ namespace ARMJIT
typedef u32 (*CompiledBlock)();
class RegCache
{
static const int NativeRegAllocOrder[];
static const int NativeRegsCount;
};
struct FetchedInstr
{
u32 A_Reg(int pos) const
@ -117,24 +107,13 @@ inline void InsertBlock(u32 num, u32 addr, CompiledBlock func)
cache.AddrMapping[num][(addr & 0xFFFFFFF) >> 14][(addr & 0x3FFF) >> 1] = func;
}
inline void ResetBlocks()
{
memset(cache.MainRAM, 0, sizeof(cache.MainRAM));
memset(cache.SWRAM, 0, sizeof(cache.SWRAM));
memset(cache.ARM9_BIOS, 0, sizeof(cache.ARM9_BIOS));
memset(cache.ARM9_ITCM, 0, sizeof(cache.ARM9_ITCM));
memset(cache.ARM9_LCDC, 0, sizeof(cache.ARM9_LCDC));
memset(cache.ARM7_BIOS, 0, sizeof(cache.ARM7_BIOS));
memset(cache.ARM7_WIRAM, 0, sizeof(cache.ARM7_WIRAM));
memset(cache.ARM7_WRAM, 0, sizeof(cache.ARM7_WRAM));
memset(cache.ARM7_WVRAM, 0, sizeof(cache.ARM7_WVRAM));
}
void Init();
void DeInit();
CompiledBlock CompileBlock(ARM* cpu);
void ResetBlocks();
}
#endif