Revert parts of r6032 that break OS X and probably other non-Windows
platforms as well. It would seem that ABI_PARAMx will have to be used more consistently elsewhere to match up with a change to use them here. Not sure yet why I still need the final section of Jit64::stX. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6035 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fcf2fb2b9b
commit
bbc69a64ad
|
@ -412,14 +412,12 @@ void Jit64::stX(UGeckoInstruction inst)
|
||||||
|
|
||||||
//Still here? Do regular path.
|
//Still here? Do regular path.
|
||||||
|
|
||||||
gpr.FlushLockX(ABI_PARAM1, ABI_PARAM2);
|
gpr.FlushLockX(ECX, EDX);
|
||||||
gpr.Lock(s, a);
|
gpr.Lock(a);
|
||||||
if (update && offset)
|
MOV(32, R(EDX), gpr.R(a));
|
||||||
gpr.LoadToX64(a, true, true);
|
MOV(32, R(ECX), gpr.R(s));
|
||||||
MOV(32, R(ABI_PARAM2), gpr.R(a));
|
if (offset)
|
||||||
MOV(32, R(ABI_PARAM1), gpr.R(s));
|
ADD(32, R(EDX), Imm32((u32)offset));
|
||||||
SafeWriteRegToReg(ABI_PARAM1, ABI_PARAM2, accessSize, offset);
|
|
||||||
|
|
||||||
if (update && offset)
|
if (update && offset)
|
||||||
{
|
{
|
||||||
MEMCHECK_START
|
MEMCHECK_START
|
||||||
|
@ -428,7 +426,24 @@ void Jit64::stX(UGeckoInstruction inst)
|
||||||
|
|
||||||
MEMCHECK_END
|
MEMCHECK_END
|
||||||
}
|
}
|
||||||
|
TEST(32, R(EDX), Imm32(0x0C000000));
|
||||||
|
FixupBranch unsafe_addr = J_CC(CC_NZ);
|
||||||
|
BSWAP(accessSize, ECX);
|
||||||
|
#ifdef _M_X64
|
||||||
|
MOV(accessSize, MComplex(RBX, EDX, SCALE_1, 0), R(ECX));
|
||||||
|
#else
|
||||||
|
AND(32, R(EDX), Imm32(Memory::MEMVIEW32_MASK));
|
||||||
|
MOV(accessSize, MDisp(EDX, (u32)Memory::base), R(ECX));
|
||||||
|
#endif
|
||||||
|
FixupBranch skip_call = J();
|
||||||
|
SetJumpTarget(unsafe_addr);
|
||||||
|
switch (accessSize)
|
||||||
|
{
|
||||||
|
case 32: ABI_CallFunctionRR(thunks.ProtectFunction((void *)&Memory::Write_U32, 2), ECX, EDX); break;
|
||||||
|
case 16: ABI_CallFunctionRR(thunks.ProtectFunction((void *)&Memory::Write_U16, 2), ECX, EDX); break;
|
||||||
|
case 8: ABI_CallFunctionRR(thunks.ProtectFunction((void *)&Memory::Write_U8, 2), ECX, EDX); break;
|
||||||
|
}
|
||||||
|
SetJumpTarget(skip_call);
|
||||||
gpr.UnlockAll();
|
gpr.UnlockAll();
|
||||||
gpr.UnlockAllX();
|
gpr.UnlockAllX();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue