arm64: Use LDRUH instead of two LDRBs.

Small boost - 5.66x instead of 5x steps.
This commit is contained in:
Unknown W. Brackets 2017-12-02 19:27:30 -08:00
parent aa0cc6712f
commit 5788e33b2f

View File

@ -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);