Permalink
Browse files

Merge pull request #10240 from unknownbrackets/vertdec

arm64: Use LDRUH instead of two LDRBs
  • Loading branch information...
hrydgard committed Dec 6, 2017
2 parents a1e74d0 + 5788e33 commit cb835fb17d89cfde963d984aebd1a5552d2a256d
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 cb835fb

Please sign in to comment.