Commit 0c5ed23c authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[builtins] [arm] Combine pushes in GenerateTailCallToReturnedCode

Combines several individual pushes/pops into a single call to Push in
GenerateTailCallToReturnedCode. This saves a single instruction since
pushes in descending register order can be be merged into a single
instruction. The pop merge doesn't save anything but is done for
consistency.

Bug: v8:9771
Change-Id: I67084985ef5b7b2ed2fc73faedbb0bd9c50e6df6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868612
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64382}
parent 180f017f
......@@ -72,17 +72,14 @@ static void GenerateTailCallToReturnedCode(MacroAssembler* masm,
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
// Push a copy of the target function and the new target.
__ push(r1);
__ push(r3);
// Push function as parameter to the runtime call.
__ Push(r1);
__ Push(r1, r3, r1);
__ CallRuntime(function_id, 1);
__ mov(r2, r0);
// Restore target function and new target.
__ pop(r3);
__ pop(r1);
__ Pop(r1, r3);
}
static_assert(kJavaScriptCallCodeStartRegister == r2, "ABI mismatch");
__ JumpCodeObject(r2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment