Commit b8b32f6b authored by George Wort's avatar George Wort Committed by V8 LUCI CQ

[arm64][arm] Only save clobbered registers when calling RecordWrite

RecordWrite uses callee saved registers, so only the clobbered registers
need to be saved by the caller.
This change gives us a 1% reduction in embedded blob size for arm64.
No change is seen for arm as the STM instruction can store and load
multiple registers.

Change-Id: I8e41da43851e96d3454a01c7093d76f2e0378214
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3406744Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#78900}
parent 9f7cbe9b
......@@ -224,6 +224,10 @@ constexpr RegList WriteBarrierDescriptor::ComputeSavedRegisters(
if (slot_address != no_reg && slot_address != SlotAddressRegister()) {
saved_registers |= SlotAddressRegister().bit();
}
#elif V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
if (object != ObjectRegister()) saved_registers |= ObjectRegister().bit();
// The slot address is always clobbered.
saved_registers |= SlotAddressRegister().bit();
#else
// TODO(cbruni): Enable callee-saved registers for other platforms.
// This is a temporary workaround to prepare code for callee-saved registers.
......
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