mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
jit: Initialize startDefaultPrefix when switching.
This commit is contained in:
parent
27870aa593
commit
f544a87b2f
4 changed files with 9 additions and 4 deletions
|
@ -88,7 +88,7 @@ Jit::Jit(MIPSState *mips) : blocks(mips, this), gpr(mips, &jo), fpr(mips), mips_
|
|||
AllocCodeSpace(1024 * 1024 * 16); // 32MB is the absolute max because that's what an ARM branch instruction can reach, backwards and forwards.
|
||||
GenerateFixedCode();
|
||||
|
||||
js.startDefaultPrefix = true;
|
||||
js.startDefaultPrefix = mips_->HasDefaultPrefix();
|
||||
}
|
||||
|
||||
void Jit::DoState(PointerWrap &p)
|
||||
|
|
|
@ -218,6 +218,10 @@ void MIPSState::Init() {
|
|||
rng.Init(0x1337);
|
||||
}
|
||||
|
||||
bool MIPSState::HasDefaultPrefix() const {
|
||||
return vfpuCtrl[VFPU_CTRL_SPREFIX] == 0xe4 && vfpuCtrl[VFPU_CTRL_TPREFIX] == 0xe4 && vfpuCtrl[VFPU_CTRL_DPREFIX] == 0;
|
||||
}
|
||||
|
||||
void MIPSState::UpdateCore(CPUCore desired) {
|
||||
if (PSP_CoreParameter().cpuCore == desired) {
|
||||
return;
|
||||
|
|
|
@ -186,6 +186,8 @@ public:
|
|||
return (vfpuCtrl[VFPU_CTRL_DPREFIX] >> (8 + i)) & 1;
|
||||
}
|
||||
|
||||
bool HasDefaultPrefix() const;
|
||||
|
||||
void SingleStep();
|
||||
int RunLoopUntil(u64 globalTicks);
|
||||
// To clear jit caches, etc.
|
||||
|
|
|
@ -135,10 +135,9 @@ Jit::Jit(MIPSState *mips) : blocks(mips, this), mips_(mips)
|
|||
fpr.SetEmitter(this);
|
||||
AllocCodeSpace(1024 * 1024 * 16);
|
||||
asm_.Init(mips, this);
|
||||
// TODO: If it becomes possible to switch from the interpreter, this should be set right.
|
||||
js.startDefaultPrefix = true;
|
||||
|
||||
safeMemFuncs.Init(&thunks);
|
||||
|
||||
js.startDefaultPrefix = mips_->HasDefaultPrefix();
|
||||
}
|
||||
|
||||
Jit::~Jit() {
|
||||
|
|
Loading…
Add table
Reference in a new issue