From cd13d2d66f6e1a5fa39a69e79ca2aee3724d1ce4 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 29 Nov 2014 06:52:09 +0000 Subject: [PATCH] [ARM32] Fix a couple bugs in the paired loadstore routines. This code was obviously wrong, we were sign extending 8 bit unsigned values and loading from the wrong offset as well. This fixes a bug in Muramasa where some colours were going insane. --- Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp index 4ece379575..b0966d4f58 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitAsm.cpp @@ -226,12 +226,10 @@ void JitArmAsmRoutineManager::GenerateCommon() BIC(R10, R10, mask); ADD(R10, R10, R8); - LDRH(R12, R10); - SXTB(R12, R12); + LDRB(R12, R10); VMOV(S0, R12); - LDRH(R12, R10, 2); - SXTB(R12, R12); + LDRB(R12, R10, 1); VMOV(S1, R12); MOVI2R(R10, (u32)&m_dequantizeTableS); @@ -252,7 +250,6 @@ void JitArmAsmRoutineManager::GenerateCommon() ADD(R10, R10, R8); LDRB(R12, R10); - SXTB(R12, R12); VMOV(S0, R12); MOVI2R(R10, (u32)&m_dequantizeTableS); @@ -270,12 +267,10 @@ void JitArmAsmRoutineManager::GenerateCommon() BIC(R10, R10, mask); ADD(R10, R10, R8); - LDRH(R12, R10); - SXTB(R12, R12); + LDRSB(R12, R10); VMOV(S0, R12); - LDRH(R12, R10, 2); - SXTB(R12, R12); + LDRSB(R12, R10, 1); VMOV(S1, R12); MOVI2R(R10, (u32)&m_dequantizeTableS); @@ -295,8 +290,7 @@ void JitArmAsmRoutineManager::GenerateCommon() BIC(R10, R10, mask); ADD(R10, R10, R8); - LDRB(R12, R10); - SXTB(R12, R12); + LDRSB(R12, R10); VMOV(S0, R12); MOVI2R(R10, (u32)&m_dequantizeTableS); @@ -316,12 +310,10 @@ void JitArmAsmRoutineManager::GenerateCommon() LDRH(R12, R10); REV16(R12, R12); - SXTH(R12, R12); VMOV(S0, R12); LDRH(R12, R10, 2); REV16(R12, R12); - SXTH(R12, R12); VMOV(S1, R12); MOVI2R(R10, (u32)&m_dequantizeTableS);