Skip to content

Commit

Permalink
arm64jit: Skip storing spilled but not dirty.
Browse files Browse the repository at this point in the history
Unless IMM, we don't need to store non-dirty mapped regs.
  • Loading branch information
unknownbrackets committed Dec 28, 2017
1 parent 3fae092 commit 9573a79
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Core/MIPS/ARM64/Arm64RegCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9573a79

Please sign in to comment.