Commit 50b56e10 authored by Tom Tan's avatar Tom Tan Committed by Commit Bot

[arm64] Remove x18 from saved_register list for deoptimization

Below change canceled removing x18 from restore_list for deoptimization
entries, but it also doesn't remove it from the saved_register list
which causes x18 be restored incorrectly when deopt happens.

https://chromium-review.googlesource.com/c/v8/v8/+/1583762

Bug: chromium:893460
Change-Id: Iccb950150a07119a3642dc42f044e94eb49db76e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1600674Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61342}
parent 779e9e06
......@@ -117,11 +117,14 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
DCHECK_EQ(saved_float_registers.Count() % 4, 0);
__ PushCPURegList(saved_float_registers);
// We save all the registers except sp, lr and the masm scratches.
// We save all the registers except sp, lr, platform register (x18) and the
// masm scratches.
CPURegList saved_registers(CPURegister::kRegister, kXRegSizeInBits, 0, 28);
saved_registers.Remove(ip0);
saved_registers.Remove(ip1);
saved_registers.Remove(x18);
saved_registers.Combine(fp);
saved_registers.Align();
DCHECK_EQ(saved_registers.Count() % 2, 0);
__ PushCPURegList(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