Commit 4467d7f1 authored by mudlord's avatar mudlord Committed by Libretro-Admin
Browse files

x86 core now compiles and links.

parent a2388348
......@@ -425,6 +425,7 @@ else
CXX = g++
ifeq ($(WITH_DYNAREC), x86)
LDFLAGS += -m32
CFLAGS += -D TARGET_NO_AREC -m32
endif
CFLAGS += -D TARGET_NO_AREC
......
......@@ -286,7 +286,7 @@ u32 DYNACALL rdv_DoInterrupts_pc(u32 pc)
void bm_Rebuild();
u32 DYNACALL rdv_DoInterrupts(void* block_cpde)
{
RuntimeBlockInfo* rbi = bm_GetBlock(block_cpde);
RuntimeBlockInfo* rbi = bm_GetBlock2(block_cpde);
return rdv_DoInterrupts_pc(rbi->addr);
}
......@@ -317,7 +317,7 @@ DynarecCodeEntryPtr rdv_FindOrCompile(void)
void* DYNACALL rdv_LinkBlock(u8* code,u32 dpc)
{
RuntimeBlockInfo* rbi=bm_GetBlock(code);
RuntimeBlockInfo* rbi=bm_GetBlock2(code);
if (!rbi)
{
......@@ -347,7 +347,7 @@ void* DYNACALL rdv_LinkBlock(u8* code,u32 dpc)
DynarecCodeEntryPtr rv=rdv_FindOrCompile();
if (bm_GetBlock(code) != rbi)
if (bm_GetBlock2(code) != rbi)
{
printf(" .. null RBI: %08X -- unlinked stale block\n",next_pc);
return (void*)rv;
......
......@@ -18,6 +18,11 @@ struct DynaRBI: RuntimeBlockInfo
}
};
RuntimeBlockInfo* ngen_AllocateBlock(void)
{
return new DynaRBI();
}
x86_block* x86e;
extern int cycle_counter;
......
......@@ -11,19 +11,6 @@
int cycle_counter;
struct DynaRBI : RuntimeBlockInfo
{
/* NOTE/TODO - this was virtual u32 Relink();
* for rec_arm.cpp - check this in case of
* errors */
virtual u32 Relink()
{
return 0;
}
virtual void Relocate(void* dst) {
}
};
void ngen_init(void)
{
......@@ -44,6 +31,27 @@ void ngen_init(void)
}
#if !(FEAT_SHREC == DYNAREC_JIT && HOST_CPU == CPU_X86)
struct DynaRBI : RuntimeBlockInfo
{
/* NOTE/TODO - this was virtual u32 Relink();
* for rec_arm.cpp - check this in case of
* errors */
virtual u32 Relink()
{
return 0;
}
virtual void Relocate(void* dst) {
}
};
RuntimeBlockInfo* ngen_AllocateBlock(void)
{
return new DynaRBI();
}
extern "C" {
void ngen_FailedToFindBlock_internal(void)
......@@ -229,10 +237,7 @@ void ngen_Compile(RuntimeBlockInfo* block,bool force_checks, bool reset, bool st
}
}
RuntimeBlockInfo* ngen_AllocateBlock(void)
{
return new DynaRBI();
}
u32* GetRegPtr(u32 reg)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment