Applied the fix from r5118 to the JIT IL recompiler.

Enabled the fix on Linux x64.
Aligned the stack before calling the LoadStorePaired asm functions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5122 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2010-02-24 20:06:13 +00:00
parent d90d9976e8
commit 1b43900f30
2 changed files with 34 additions and 6 deletions

View File

@ -119,7 +119,7 @@ void Jit64::psq_st(UGeckoInstruction inst)
#if _WIN32
SUB(64, R(RSP), Imm8(0x28));
#else
//SUB(64, R(RSP), Imm8(0x8));
SUB(64, R(RSP), Imm8(0x8));
#endif
#endif
CALLptr(MDisp(EDX, (u32)(u64)asm_routines.singleStoreQuantized));
@ -127,7 +127,7 @@ void Jit64::psq_st(UGeckoInstruction inst)
#if _WIN32
ADD(64, R(RSP), Imm8(0x28));
#else
//ADD(64, R(RSP), Imm8(0x8));
ADD(64, R(RSP), Imm8(0x8));
#endif
#endif
} else {
@ -137,7 +137,7 @@ void Jit64::psq_st(UGeckoInstruction inst)
#if _WIN32
SUB(64, R(RSP), Imm8(0x28));
#else
//SUB(64, R(RSP), Imm8(0x8));
SUB(64, R(RSP), Imm8(0x8));
#endif
#endif
CALLptr(MDisp(EDX, (u32)(u64)asm_routines.pairedStoreQuantized));
@ -145,7 +145,7 @@ void Jit64::psq_st(UGeckoInstruction inst)
#if _WIN32
ADD(64, R(RSP), Imm8(0x28));
#else
//ADD(64, R(RSP), Imm8(0x8));
ADD(64, R(RSP), Imm8(0x8));
#endif
#endif
}
@ -197,7 +197,7 @@ void Jit64::psq_l(UGeckoInstruction inst)
#if _WIN32
SUB(64, R(RSP), Imm8(0x28));
#else
//SUB(64, R(RSP), Imm8(0x8));
SUB(64, R(RSP), Imm8(0x8));
#endif
#endif
CALLptr(MDisp(EDX, (u32)(u64)asm_routines.pairedLoadQuantized));
@ -205,7 +205,7 @@ void Jit64::psq_l(UGeckoInstruction inst)
#if _WIN32
ADD(64, R(RSP), Imm8(0x28));
#else
//ADD(64, R(RSP), Imm8(0x8));
ADD(64, R(RSP), Imm8(0x8));
#endif
#endif
CVTPS2PD(fpr.RX(inst.RS), R(XMM0));

View File

@ -1185,7 +1185,21 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, bool UseProfile, bool Mak
Jit->SHL(32, R(EDX), Imm8(3));
#endif
Jit->MOV(32, R(ECX), regLocForInst(RI, getOp1(I)));
#ifdef _M_X64
#if _WIN32
Jit->SUB(64, R(RSP), Imm8(0x28));
#else
Jit->SUB(64, R(RSP), Imm8(0x8));
#endif
#endif
Jit->CALLptr(MDisp(EDX, (u32)(u64)(((JitIL *)jit)->asm_routines.pairedLoadQuantized)));
#ifdef _M_X64
#if _WIN32
Jit->ADD(64, R(RSP), Imm8(0x28));
#else
Jit->ADD(64, R(RSP), Imm8(0x8));
#endif
#endif
Jit->MOVAPD(reg, R(XMM0));
RI.fregs[reg] = I;
regNormalRegClear(RI, I);
@ -1244,7 +1258,21 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, bool UseProfile, bool Mak
#endif
Jit->MOV(32, R(ECX), regLocForInst(RI, getOp2(I)));
Jit->MOVAPD(XMM0, fregLocForInst(RI, getOp1(I)));
#ifdef _M_X64
#if _WIN32
Jit->SUB(64, R(RSP), Imm8(0x28));
#else
Jit->SUB(64, R(RSP), Imm8(0x8));
#endif
#endif
Jit->CALLptr(MDisp(EDX, (u32)(u64)(((JitIL *)jit)->asm_routines.pairedStoreQuantized)));
#ifdef _M_X64
#if _WIN32
Jit->ADD(64, R(RSP), Imm8(0x28));
#else
Jit->ADD(64, R(RSP), Imm8(0x8));
#endif
#endif
if (RI.IInfo[I - RI.FirstI] & 4)
fregClearInst(RI, getOp1(I));
if (RI.IInfo[I - RI.FirstI] & 8)