Permalink
Browse files

arm64: Use LDRUH instead of two LDRBs.

Small boost - 5.66x instead of 5x steps.
  • Loading branch information...
unknownbrackets committed Dec 3, 2017
1 parent aa0cc67 commit 5788e33b2f94d162c3438299c6e9819b62f8b026
Showing with 1 addition and 6 deletions.
  1. +1 −6 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);

0 comments on commit 5788e33

Please sign in to comment.