Commit 409f7bb3 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[codegen][arm64] Avoid one use of PatchingAssembler

Creating a PatchingAssembler has significant overhead, including a
dynamic allocation for the assembler buffer implementation. In the case
of {Assembler::bind} we just need it to overwrite a machine word. Hence
avoid creating the PatchingAssembler for this trivial work and just use
Memcpy directly.

R=jkummerow@chromium.org

Change-Id: I83510cfd7ebdb0d0c378df548b442eabf3727aeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2668827Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72523}
parent e79b841b
......@@ -574,8 +574,7 @@ void Assembler::bind(Label* label) {
// Internal references do not get patched to an instruction but directly
// to an address.
internal_reference_positions_.push_back(linkoffset);
PatchingAssembler patcher(options(), reinterpret_cast<byte*>(link), 2);
patcher.dc64(reinterpret_cast<uintptr_t>(pc_));
base::Memcpy(link, &pc_, kSystemPointerSize);
} else {
link->SetImmPCOffsetTarget(options(),
reinterpret_cast<Instruction*>(pc_));
......
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