[AArch64] Add an exception exit function with the exit location already in PC.
This will be used with idle skipping later.
This commit is contained in:
parent
32eb0a9d68
commit
13b70c2fbd
|
@ -149,6 +149,25 @@ void JitArm64::WriteExceptionExit(ARM64Reg dest)
|
|||
BR(EncodeRegTo64(dest));
|
||||
}
|
||||
|
||||
void JitArm64::WriteExceptionExit()
|
||||
{
|
||||
DoDownCount();
|
||||
|
||||
ARM64Reg WA = gpr.GetReg();
|
||||
ARM64Reg XA = EncodeRegTo64(WA);
|
||||
LDR(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(pc));
|
||||
STR(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(npc));
|
||||
MOVI2R(XA, (u64)&PowerPC::CheckExceptions);
|
||||
BLR(XA);
|
||||
LDR(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(npc));
|
||||
STR(INDEX_UNSIGNED, WA, X29, PPCSTATE_OFF(pc));
|
||||
|
||||
MOVI2R(XA, (u64)asm_routines.dispatcher);
|
||||
BR(XA);
|
||||
|
||||
gpr.Unlock(WA);
|
||||
}
|
||||
|
||||
void JitArm64::WriteExitDestInR(ARM64Reg Reg)
|
||||
{
|
||||
STR(INDEX_UNSIGNED, Reg, X29, PPCSTATE_OFF(pc));
|
||||
|
|
|
@ -112,8 +112,9 @@ private:
|
|||
|
||||
// Exits
|
||||
void WriteExit(u32 destination);
|
||||
void WriteExceptionExit(ARM64Reg dest);
|
||||
void WriteExitDestInR(ARM64Reg dest);
|
||||
void WriteExceptionExit(Arm64Gen::ARM64Reg dest);
|
||||
void WriteExceptionExit();
|
||||
void WriteExitDestInR(Arm64Gen::ARM64Reg dest);
|
||||
|
||||
FixupBranch JumpIfCRFieldBit(int field, int bit, bool jump_if_set);
|
||||
|
||||
|
|
Loading…
Reference in New Issue