Merge pull request #10240 from unknownbrackets/vertdec

arm64: Use LDRUH instead of two LDRBs
This commit is contained in:
Henrik Rydgård 2017-12-06 14:09:26 +01:00 committed by GitHub
commit cb835fb17d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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