Permalink
Browse files

arm64jit: Skip storing spilled but not dirty.

Unless IMM, we don't need to store non-dirty mapped regs.
  • Loading branch information...
unknownbrackets committed Dec 28, 2017
1 parent 3fae092 commit 9573a791b41297cf6f946f9725d5671fbb9dc4e6
Showing with 7 additions and 5 deletions.
  1. +7 −5 Core/MIPS/ARM64/Arm64RegCache.cpp
@@ -486,11 +486,13 @@ void Arm64RegCache::FlushArmReg(ARM64Reg r) {
mreg.loc = ML_IMM;
mreg.reg = INVALID_REG;
} else {
_assert_msg_(JIT, mreg.loc != ML_ARMREG_AS_PTR, "Cannot flush reg as pointer");
// Note: may be a 64-bit reg.
ARM64Reg storeReg = ARM64RegForFlush(ar[r].mipsReg);
if (storeReg != INVALID_REG)
emit_->STR(INDEX_UNSIGNED, storeReg, CTXREG, GetMipsRegOffset(ar[r].mipsReg));
if (mreg.loc == ML_IMM || ar[r].isDirty) {
_assert_msg_(JIT, mreg.loc != ML_ARMREG_AS_PTR, "Cannot flush reg as pointer");
// Note: may be a 64-bit reg.
ARM64Reg storeReg = ARM64RegForFlush(ar[r].mipsReg);
if (storeReg != INVALID_REG)
emit_->STR(INDEX_UNSIGNED, storeReg, CTXREG, GetMipsRegOffset(ar[r].mipsReg));
}
mreg.loc = ML_MEM;
mreg.reg = INVALID_REG;
mreg.imm = 0;

0 comments on commit 9573a79

Please sign in to comment.