Use branch instead of tailcall for recursive calls (#2282)
* Use branch instead of tailcall for recursive calls Use a branch instead of doing a tailcall for recursive calls. This avoids having to store the dispatch address, setting up the epilogue and keeps guest registers in host registers for longer. The rejit check is moved down into the entry block so that the rejit behaviour remains the same as before. * Set PTC version Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
parent
0181068016
commit
65ac00833a
3 changed files with 22 additions and 11 deletions
|
@ -144,7 +144,14 @@ namespace ARMeilleure.Instructions
|
|||
{
|
||||
bool isRecursive = immediate == context.EntryAddress;
|
||||
|
||||
EmitJumpTableBranch(context, Const(immediate), isRecursive);
|
||||
if (isRecursive)
|
||||
{
|
||||
context.Branch(context.GetLabel(immediate));
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitJumpTableBranch(context, Const(immediate), isJump: false);
|
||||
}
|
||||
}
|
||||
|
||||
private static void EmitNativeCall(ArmEmitterContext context, Operand nativeContextPtr, Operand funcAddr, bool isJump)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue