We can now change threads

This commit is contained in:
wheremyfoodat 2022-09-20 15:30:41 +03:00
parent 1678cd6172
commit 9b95bd87f1
10 changed files with 159 additions and 14 deletions

View file

@ -119,6 +119,14 @@ public:
return jit->Regs();
}
// Get reference to array of FPRs. This array consists of the FPRs as single precision values
// Hence why its base type is u32
// Note: Dynarmic keeps 64 VFP registers as VFPv3 extends the VFP register set to 64 registers.
// However the 3DS ARM11 is an ARMv6k processor with VFPv2, so only the first 32 registers are actually used
std::array<u32, 64>& fprs() {
return jit->ExtRegs();
}
void setCPSR(u32 value) {
jit->SetCpsr(value);
}
@ -127,6 +135,19 @@ public:
return jit->Cpsr();
}
void setFPSCR(u32 value) {
jit->SetFpscr(value);
}
u32 getFPSCR() {
return jit->Fpscr();
}
// Set the base pointer to thread-local storage, stored in a CP15 register on the 3DS
void setTLSBase(u32 value) {
cp15->setTLSBase(value);
}
void runFrame() {
env.ticksLeft = 268111856 / 60;
const auto exitReason = jit->Run();