Merge pull request #211 from magumagu/win32-jit-fixes

Win32 jit fixes
This commit is contained in:
Pierre Bourdon 2014-03-26 20:18:04 +01:00
commit f6a343df79
3 changed files with 4 additions and 14 deletions

View File

@ -92,7 +92,7 @@ void XEmitter::ABI_PushRegistersAndAdjustStack(u32 mask, bool noProlog)
{
if (mask & (1 << (16 + x)))
{
MOVAPD(MDisp(RSP, offset), (X64Reg) x);
MOVUPD(MDisp(RSP, offset), (X64Reg) x);
offset += 16;
}
}
@ -114,7 +114,7 @@ void XEmitter::ABI_PopRegistersAndAdjustStack(u32 mask, bool noProlog)
{
if (mask & (1 << (16 + x)))
{
MOVAPD((X64Reg) x, MDisp(RSP, size));
MOVUPD((X64Reg) x, MDisp(RSP, size));
size += 16;
}
}
@ -213,11 +213,11 @@ void XEmitter::ABI_CallFunctionCCCP(void *func, u32 param1, u32 param2,u32 param
}
void XEmitter::ABI_CallFunctionPC(void *func, void *param1, u32 param2) {
ABI_AlignStack(3 * 4);
ABI_AlignStack(2 * 4);
PUSH(32, Imm32(param2));
PUSH(32, Imm32((u32)param1));
CALL(func);
ABI_RestoreStack(3 * 4);
ABI_RestoreStack(2 * 4);
}
void XEmitter::ABI_CallFunctionPPC(void *func, void *param1, void *param2,u32 param3) {

View File

@ -726,7 +726,6 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
u32 Jit64::RegistersInUse()
{
#if _M_X86_64
u32 result = 0;
for (int i = 0; i < NUMXREGS; i++)
{
@ -736,8 +735,4 @@ u32 Jit64::RegistersInUse()
result |= (1 << (16 + i));
}
return result;
#else
// not needed
return 0;
#endif
}

View File

@ -61,7 +61,6 @@ struct RegInfo {
};
static u32 regsInUse(RegInfo& R) {
#if _M_X86_64
u32 result = 0;
for (unsigned i = 0; i < MAX_NUMBER_OF_REGS; i++)
{
@ -71,10 +70,6 @@ static u32 regsInUse(RegInfo& R) {
result |= (1 << (16 + i));
}
return result;
#else
// not needed
return 0;
#endif
}
static void regMarkUse(RegInfo& R, InstLoc I, InstLoc Op, unsigned OpNum) {