summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp13
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp3
2 files changed, 6 insertions, 10 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
index a6ea29ca7f..b30a847181 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
@@ -314,8 +314,7 @@ void Jit64::stX(UGeckoInstruction inst)
else if (Memory::IsRAMAddress(addr))
{
MOV(32, R(EAX), gpr.R(s));
- BSWAP(accessSize, EAX);
- WriteToConstRamAddress(accessSize, R(EAX), addr);
+ WriteToConstRamAddress(accessSize, EAX, addr, true);
if (update)
gpr.SetImmediate32(a, addr);
return;
@@ -344,10 +343,10 @@ void Jit64::stX(UGeckoInstruction inst)
gpr.FlushLockX(ABI_PARAM1);
MOV(32, R(ABI_PARAM1), gpr.R(a));
MOV(32, R(EAX), gpr.R(s));
- BSWAP(32, EAX);
#if _M_X86_64
- MOV(accessSize, MComplex(RBX, ABI_PARAM1, SCALE_1, (u32)offset), R(EAX));
+ SwapAndStore(accessSize, MComplex(RBX, ABI_PARAM1, SCALE_1, (u32)offset), EAX);
#else
+ BSWAP(32, EAX);
AND(32, R(ABI_PARAM1), Imm32(Memory::MEMVIEW32_MASK));
MOV(accessSize, MDisp(ABI_PARAM1, (u32)Memory::base + (u32)offset), R(EAX));
#endif
@@ -456,8 +455,7 @@ void Jit64::lmw(UGeckoInstruction inst)
ADD(32, R(EAX), gpr.R(inst.RA));
for (int i = inst.RD; i < 32; i++)
{
- MOV(32, R(ECX), MComplex(EBX, EAX, SCALE_1, (i - inst.RD) * 4));
- BSWAP(32, ECX);
+ LoadAndSwap(32, ECX, MComplex(EBX, EAX, SCALE_1, (i - inst.RD) * 4));
gpr.BindToRegister(i, false, true);
MOV(32, gpr.R(i), R(ECX));
}
@@ -481,8 +479,7 @@ void Jit64::stmw(UGeckoInstruction inst)
for (int i = inst.RD; i < 32; i++)
{
MOV(32, R(ECX), gpr.R(i));
- BSWAP(32, ECX);
- MOV(32, MComplex(EBX, EAX, SCALE_1, (i - inst.RD) * 4), R(ECX));
+ SwapAndStore(32, MComplex(EBX, EAX, SCALE_1, (i - inst.RD) * 4), ECX);
}
gpr.UnlockAllX();
#else
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
index 1a0b03ad3d..cd0261e158 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
@@ -96,8 +96,7 @@ void Jit64::lfd(UGeckoInstruction inst)
MOVSD(xd, R(XMM0));
} else {
#if _M_X86_64
- MOV(64, R(EAX), MComplex(RBX, ABI_PARAM1, SCALE_1, offset));
- BSWAP(64, EAX);
+ LoadAndSwap(64, EAX, MComplex(RBX, ABI_PARAM1, SCALE_1, offset));
MOV(64, M(&temp64), R(EAX));
MEMCHECK_START