From 257b11366d87b3b319e8be67a60800a2671ad747 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 19 Apr 2014 02:23:57 +0200 Subject: [PATCH] WriteToConstRamAddress: support swap on 32 bit too --- Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp index 0b30ab67ab..ca5d533fc2 100644 --- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp @@ -547,7 +547,10 @@ void EmuCodeBlock::WriteToConstRamAddress(int accessSize, Gen::X64Reg arg, u32 a else MOV(accessSize, MDisp(RBX, address & 0x3FFFFFFF), R(arg)); #else - MOV(accessSize, M((void*)(Memory::base + (address & Memory::MEMVIEW32_MASK))), R(arg)); + if (swap) + SwapAndStore(accessSize, M((void*)(Memory::base + (address & Memory::MEMVIEW32_MASK))), arg); + else + MOV(accessSize, M((void*)(Memory::base + (address & Memory::MEMVIEW32_MASK))), R(arg)); #endif }