mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-09 02:26:19 +00:00
IR: Split Syscall into Syscall and ExitToPC, so we can put ApplyRoundingMode in between.
This commit is contained in:
parent
cc1a16b0e0
commit
64eda6a4ec
@ -386,9 +386,9 @@ void IRFrontend::Comp_Syscall(MIPSOpcode op) {
|
||||
FlushAll();
|
||||
|
||||
ir.Write(IROp::Syscall, 0, ir.AddConstant(op.encoding));
|
||||
|
||||
// TODO: This never happens because of Syscall exiting.
|
||||
ApplyRoundingMode();
|
||||
ir.Write(IROp::ExitToPC);
|
||||
|
||||
js.compiling = false;
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,7 @@ static const IRMeta irMeta[] = {
|
||||
|
||||
{ IROp::Interpret, "Interpret", "_C" },
|
||||
{ IROp::Downcount, "Downcount", "_II" },
|
||||
{ IROp::ExitToPC, "ExitToPC", "", IRFLAG_EXIT },
|
||||
{ IROp::ExitToConst, "Exit", "C", IRFLAG_EXIT },
|
||||
{ IROp::ExitToConstIfEq, "ExitIfEq", "CGG", IRFLAG_EXIT },
|
||||
{ IROp::ExitToConstIfNeq, "ExitIfNeq", "CGG", IRFLAG_EXIT },
|
||||
|
@ -204,6 +204,7 @@ enum class IROp : u8 {
|
||||
|
||||
ExitToConstIfFpTrue,
|
||||
ExitToConstIfFpFalse,
|
||||
ExitToPC, // Used after a syscall to give us a way to do things before returning.
|
||||
|
||||
Syscall,
|
||||
SetPC, // hack to make syscall returns work
|
||||
|
@ -587,9 +587,12 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c
|
||||
CallSyscall(op);
|
||||
if (coreState != CORE_RUNNING)
|
||||
CoreTiming::ForceCheck();
|
||||
return mips->pc;
|
||||
break;
|
||||
}
|
||||
|
||||
case IROp::ExitToPC:
|
||||
return mips->pc;
|
||||
|
||||
case IROp::Interpret: // SLOW fallback. Can be made faster.
|
||||
{
|
||||
MIPSOpcode op(constPool[inst->src1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user