riscv: Correct depointerify on FlushAll().

This commit is contained in:
Unknown W. Brackets
2023-07-23 18:01:00 -07:00
parent 720f868a10
commit 8ee73264bf
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -777,7 +777,7 @@ void Arm64RegCache::FlushAll() {
// Re-pointerify
emit_->MOVK(EncodeRegTo64(allocs[i].ar), ((uint64_t)Memory::base) >> 32, SHIFT_32);
ar[allocs[i].ar].pointerified = true;
} else {
} else if (!allocs[i].pointerified) {
// If this register got pointerified on the way, mark it as not, so that after save/reload (like in an interpreter fallback), it won't be regarded as such, as it simply won't be.
ar[allocs[i].ar].pointerified = false;
}
+2 -1
View File
@@ -795,9 +795,10 @@ void RiscVRegCache::FlushAll() {
for (int i = 0; i < count; i++) {
if (allocs[i].pointerified && !ar[allocs[i].ar].pointerified && jo_->enablePointerify) {
// Re-pointerify
_dbg_assert_(mr[allocs[i].mr].loc == MIPSLoc::RVREG);
AddMemBase(allocs[i].ar);
ar[allocs[i].ar].pointerified = true;
} else {
} else if (!allocs[i].pointerified) {
// If this register got pointerified on the way, mark it as not.
// This is so that after save/reload (like in an interpreter fallback),
// it won't be regarded as such, as it may no longer be.