Merge pull request #10844 from unknownbrackets/arm64jit

arm64jit: Fix a case of R() on unmapped
This commit is contained in:
Henrik Rydgård 2018-04-01 09:29:45 +02:00 committed by GitHub
commit 9d2a8a7647
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,7 +334,7 @@ namespace MIPSComp {
if (!load && gpr.IsImm(rt) && gpr.TryMapTempImm(rt) != INVALID_REG) {
// We're storing an immediate value, let's see if we can optimize rt.
if (!gpr.IsImm(rs) || offset == 0) {
if (!gpr.IsImm(rs) || !Memory::IsValidAddress(iaddr) || offset == 0) {
// In this case, we're always going to need rs mapped, which may flush the temp imm.
// We handle that in the cases below since targetReg is INVALID_REG.
gpr.MapIn(rs);