aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-02-07 00:12:09 +0100
committerRSDuck <rsduck@users.noreply.github.com>2020-04-26 13:05:13 +0200
commit2e6e6aa75094bfb3efbae805006249c26c0c4726 (patch)
treee9856f30f1c380ced4ad9d10f170311de7fcb5df /src
parent266fd20ea536e1c2cd98fce49ef23dbd01f3a8cd (diff)
this it should work
Diffstat (limited to 'src')
-rw-r--r--src/ARMJIT_RegisterCache.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ARMJIT_RegisterCache.h b/src/ARMJIT_RegisterCache.h
index 8460825..d4e5539 100644
--- a/src/ARMJIT_RegisterCache.h
+++ b/src/ARMJIT_RegisterCache.h
@@ -95,6 +95,20 @@ 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];
@@ -111,7 +125,7 @@ public:
for (int j = 0; j < 16; j++)
ranking[j] = 0;
for (int j = i; j < InstrsCount; j++)
- {
+ {s
BitSet16 regsNeeded((Instrs[j].Info.SrcRegs & ~(1 << 15)) | Instrs[j].Info.DstRegs);
futureNeeded |= regsNeeded.m_val;
regsNeeded &= BitSet16(~Instrs[j].Info.NotStrictlyNeeded);