From 69c3e6516c2928ae8d93c7060d95a60175424b25 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 14 Nov 2014 15:12:25 +0000 Subject: [PATCH 1/3] Disables NEON optimized instructions. These are causing issues in games. In particular you get pink on the screen in Animal Crossing. Disable until fully investigated. This also disables fastmem on floating point loadstore instructions which are horribly broken and won't actually backpatch when an invalid read/write is encountered. --- Source/Core/Core/PowerPC/JitArm32/JitArm_FloatingPoint.cpp | 5 +++++ .../Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp | 5 +++-- Source/Core/Core/PowerPC/JitArm32/JitArm_Paired.cpp | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_FloatingPoint.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_FloatingPoint.cpp index af266e5c98..41a11a10c2 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_FloatingPoint.cpp @@ -27,6 +27,7 @@ void JitArm::fctiwx(UGeckoInstruction inst) { INSTRUCTION_START JITDISABLE(bJITFloatingPointOff); + FALLBACK_IF(true); u32 b = inst.FB; u32 d = inst.FD; @@ -134,6 +135,8 @@ void JitArm::fctiwzx(UGeckoInstruction inst) { INSTRUCTION_START JITDISABLE(bJITFloatingPointOff); + FALLBACK_IF(true); + u32 b = inst.FB; u32 d = inst.FD; @@ -493,6 +496,8 @@ void JitArm::frsqrtex(UGeckoInstruction inst) { INSTRUCTION_START JITDISABLE(bJITPairedOff); + FALLBACK_IF(true); + FALLBACK_IF(inst.Rc); u32 b = inst.FB, d = inst.FD; diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp index f54b8ed635..e9588b1c62 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp @@ -134,7 +134,7 @@ void JitArm::lfXX(UGeckoInstruction inst) if (update) MOV(RA, rB); - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem) + if (false) { Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK) BIC(rB, rB, mask); // 1 @@ -301,7 +301,8 @@ void JitArm::stfXX(UGeckoInstruction inst) MOV(RA, rB); SetCC(); } - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem) + + if (false) { Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK) BIC(rB, rB, mask); // 1 diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_Paired.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_Paired.cpp index cd4a28cd00..eeeb743f69 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_Paired.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_Paired.cpp @@ -21,6 +21,8 @@ void JitArm::ps_rsqrte(UGeckoInstruction inst) { INSTRUCTION_START JITDISABLE(bJITPairedOff); + FALLBACK_IF(true); + FALLBACK_IF(inst.Rc); u32 b = inst.FB, d = inst.FD; From b0becf7af8f622f69936be6759ebdb61831c9a03 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 14 Nov 2014 15:14:10 +0000 Subject: [PATCH 2/3] Enables the ARMv7 FPR cache. The problem instructions with the FPR are disabled in the previous commit. This can now be reenabled for fairly large performance gains. --- Source/Core/Core/PowerPC/JitArm32/Jit.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/JitArm32/Jit.cpp b/Source/Core/Core/PowerPC/JitArm32/Jit.cpp index de9abfa988..cf2ef79562 100644 --- a/Source/Core/Core/PowerPC/JitArm32/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/Jit.cpp @@ -444,7 +444,6 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo BKPT(0x7777); } JitArmTables::CompileInstruction(ops[i]); - fpr.Flush(); if (js.memcheck && (opinfo->flags & FL_LOADSTORE)) { // Don't do this yet From eb7543d139aec1412484fc8b2f7eb6ba2efb45a5 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 14 Nov 2014 15:14:53 +0000 Subject: [PATCH 3/3] Enables ARMv7 build options entirely on ARM. We only support ARMv7 with Dolphin, so if we are building on ARM have our target be for armv7-a. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a90d3410..96c326166f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,9 +153,7 @@ if(NOT ENABLE_GENERIC) set(_M_ARM 1) set(_M_ARM_32 1) add_definitions(-D_M_ARM=1 -D_M_ARM_32=1) - if(${ANDROID_NDK_ABI_NAME} MATCHES "armeabi-v7a") - add_definitions(-marm -march=armv7-a) - endif() + add_definitions(-marm -march=armv7-a) elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") # This option only applies to 64bit ARM set(_M_ARM 1)