From 5788e33b2f94d162c3438299c6e9819b62f8b026 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 2 Dec 2017 19:27:30 -0800 Subject: [PATCH] arm64: Use LDRUH instead of two LDRBs. Small boost - 5.66x instead of 5x steps. --- GPU/Common/VertexDecoderArm64.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/GPU/Common/VertexDecoderArm64.cpp b/GPU/Common/VertexDecoderArm64.cpp index 0e31dd80c2..aab6b4ca36 100644 --- a/GPU/Common/VertexDecoderArm64.cpp +++ b/GPU/Common/VertexDecoderArm64.cpp @@ -698,12 +698,7 @@ void VertexDecoderJitCache::Jit_PosS16Through() { } void VertexDecoderJitCache::Jit_NormalS8() { - // nrmoff can be odd in case of byte-only vertices! odd unsigned offsets are not allowed for LDRH. - // Switching to LDRB. - // Only seen this in a crash log. - LDRB(INDEX_UNSIGNED, tempReg1, srcReg, dec_->nrmoff); - LDRB(INDEX_UNSIGNED, tempReg3, srcReg, dec_->nrmoff + 1); - ORR(tempReg1, tempReg1, tempReg3, ArithOption(tempReg3, ST_LSL, 8)); + LDURH(tempReg1, srcReg, dec_->nrmoff); LDRB(INDEX_UNSIGNED, tempReg3, srcReg, dec_->nrmoff + 2); ORR(tempReg1, tempReg1, tempReg3, ArithOption(tempReg3, ST_LSL, 16)); STR(INDEX_UNSIGNED, tempReg1, dstReg, dec_->decFmt.nrmoff);