aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT_RegisterCache.h
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-05-09 00:45:05 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-06-16 12:01:08 +0200
commit052ff7367211728209d6eb5f8f0f6d02cfab321e (patch)
treeb9c99618a88d3a30846200a96077e7c7d9357c3e /src/ARMJIT_RegisterCache.h
parentb902cd1b8e0b5509f108e2b60ded3ec38b1c53fc (diff)
rewrite JIT memory emulation
Diffstat (limited to 'src/ARMJIT_RegisterCache.h')
-rw-r--r--src/ARMJIT_RegisterCache.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/ARMJIT_RegisterCache.h b/src/ARMJIT_RegisterCache.h
index 5e18e84..0547c84 100644
--- a/src/ARMJIT_RegisterCache.h
+++ b/src/ARMJIT_RegisterCache.h
@@ -95,20 +95,6 @@ public:
LiteralsLoaded = 0;
}
- BitSet32 GetPushRegs()
- {
- BitSet16 used;
- for (int i = 0; i < InstrsCount; i++)
- used |= BitSet16(Instrs[i].Info.SrcRegs | Instrs[i].Info.DstRegs);
-
- BitSet32 res;
- u32 registersMax = std::min((int)used.Count(), NativeRegsAvailable);
- for (int i = 0; i < registersMax; i++)
- res |= BitSet32(1 << (int)NativeRegAllocOrder[i]);
-
- return res;
- }
-
void Prepare(bool thumb, int i)
{
FetchedInstr instr = Instrs[i];
@@ -139,7 +125,6 @@ public:
UnloadRegister(reg);
u16 necessaryRegs = ((instr.Info.SrcRegs & PCAllocatableAsSrc) | instr.Info.DstRegs) & ~instr.Info.NotStrictlyNeeded;
- u16 writeRegs = instr.Info.DstRegs & ~instr.Info.NotStrictlyNeeded;
BitSet16 needToBeLoaded(necessaryRegs & ~LoadedRegs);
if (needToBeLoaded != BitSet16(0))
{
@@ -182,13 +167,12 @@ public:
if (left-- == 0)
break;
- writeRegs |= (1 << reg) & instr.Info.DstRegs;
LoadRegister(reg, !(thumb || instr.Cond() >= 0xE) || (1 << reg) & instr.Info.SrcRegs);
}
}
}
- DirtyRegs |= writeRegs & ~(1 << 15);
+ DirtyRegs |= (LoadedRegs & instr.Info.DstRegs) & ~(1 << 15);
}
static const Reg NativeRegAllocOrder[];