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-06-16 11:57:55 +0200
commit262dc7ad0003e31078c219ba3f295e018cf14a1e (patch)
treeabf29bcffe3b18131d59762e7fb2174c4fb6eef6 /src
parentd2acceb36754df349cf5d483155f71332a50000c (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);