mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 11:32:43 +01:00
Enable more parts of the JIT under linux
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@152 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6b8d9e1bb0
commit
c8c1d2d905
@ -146,22 +146,16 @@ bool ElfReader::LoadInto(u32 vaddr)
|
|||||||
u8 *dst = Memory::GetPointer(writeAddr);
|
u8 *dst = Memory::GetPointer(writeAddr);
|
||||||
u32 srcSize = p->p_filesz;
|
u32 srcSize = p->p_filesz;
|
||||||
u32 dstSize = p->p_memsz;
|
u32 dstSize = p->p_memsz;
|
||||||
//PSPHLE::userMemory.AllocAt(writeAddr, dstSize);
|
|
||||||
//memcpy(dst, src, srcSize);
|
|
||||||
u32 *s = (u32*)src;
|
u32 *s = (u32*)src;
|
||||||
u32 *d = (u32*)dst;
|
u32 *d = (u32*)dst;
|
||||||
|
for (int j = 0; j < (int)(srcSize + 3) / 4; j++)
|
||||||
//TODO : remove byteswapping
|
|
||||||
for (int i=0; i<(int)srcSize/4+1; i++)
|
|
||||||
{
|
{
|
||||||
*d++ = /*_byteswap_ulong*/(*s++);
|
*d++ = /*_byteswap_ulong*/(*s++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srcSize < dstSize)
|
if (srcSize < dstSize)
|
||||||
{
|
{
|
||||||
//memset(dst + srcSize, 0, dstSize-srcSize); //zero out bss
|
//memset(dst + srcSize, 0, dstSize-srcSize); //zero out bss
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(MASTER_LOG,"Loadable Segment Copied to %08x, size %08x", writeAddr, p->p_memsz);
|
LOG(MASTER_LOG,"Loadable Segment Copied to %08x, size %08x", writeAddr, p->p_memsz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,6 @@ namespace Jit64
|
|||||||
JMP(Asm::testExceptions, true);
|
JMP(Asm::testExceptions, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const u8* DoJit(u32 emaddress, JitBlock &b)
|
const u8* DoJit(u32 emaddress, JitBlock &b)
|
||||||
{
|
{
|
||||||
_assert_msg_(DYNA_REC, emaddress != 0, "ERROR - Trying to compile at 0. LR=%08x",LR);
|
_assert_msg_(DYNA_REC, emaddress != 0, "ERROR - Trying to compile at 0. LR=%08x",LR);
|
||||||
@ -391,12 +390,6 @@ namespace Jit64
|
|||||||
js.op = &ops[i];
|
js.op = &ops[i];
|
||||||
js.instructionNumber = i;
|
js.instructionNumber = i;
|
||||||
if (i == (int)size - 1) js.isLastInstruction = true;
|
if (i == (int)size - 1) js.isLastInstruction = true;
|
||||||
//PPCTables::CompileInstruction(ops[i].inst);
|
|
||||||
#ifndef _WIN32
|
|
||||||
if (!js.isLastInstruction)
|
|
||||||
Default(ops[i].inst);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
PPCTables::CompileInstruction(ops[i].inst);
|
PPCTables::CompileInstruction(ops[i].inst);
|
||||||
gpr.SanityCheck();
|
gpr.SanityCheck();
|
||||||
fpr.SanityCheck();
|
fpr.SanityCheck();
|
||||||
|
@ -335,6 +335,10 @@ namespace Jit64
|
|||||||
MOVAPS(MComplex(EBX, EAX, SCALE_1, 16), XMM0);
|
MOVAPS(MComplex(EBX, EAX, SCALE_1, 16), XMM0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#define INSTRUCTION_START Default(inst); return;
|
||||||
|
#endif
|
||||||
|
|
||||||
void stX(UGeckoInstruction inst)
|
void stX(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
INSTRUCTION_START;
|
INSTRUCTION_START;
|
||||||
|
@ -35,8 +35,11 @@
|
|||||||
#include "JitAsm.h"
|
#include "JitAsm.h"
|
||||||
#include "JitRegCache.h"
|
#include "JitRegCache.h"
|
||||||
|
|
||||||
// #define INSTRUCTION_START Default(inst); return;
|
#ifdef _WIN32
|
||||||
#define INSTRUCTION_START
|
#define INSTRUCTION_START
|
||||||
|
#else
|
||||||
|
#define INSTRUCTION_START Default(inst); return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
#define DISABLE_32BIT Default(inst); return;
|
#define DISABLE_32BIT Default(inst); return;
|
||||||
@ -48,8 +51,6 @@ namespace Jit64 {
|
|||||||
|
|
||||||
static double GC_ALIGNED16(psTemp[2]) = {1.0, 1.0};
|
static double GC_ALIGNED16(psTemp[2]) = {1.0, 1.0};
|
||||||
static u64 GC_ALIGNED16(temp64);
|
static u64 GC_ALIGNED16(temp64);
|
||||||
static u32 GC_ALIGNED16(temp32);
|
|
||||||
static u32 temp;
|
|
||||||
|
|
||||||
// TODO(ector): Improve 64-bit version
|
// TODO(ector): Improve 64-bit version
|
||||||
void WriteDual32(u64 value, u32 address)
|
void WriteDual32(u64 value, u32 address)
|
||||||
|
@ -32,7 +32,7 @@ u32 s_nTargetWidth = 0, s_nTargetHeight = 0;
|
|||||||
u32 g_AAx = 0, g_AAy = 0;
|
u32 g_AAx = 0, g_AAy = 0;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
static GLWindow GLWin;
|
GLWindow GLWin;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user