Commit f48fb8b1 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Arm64] Remove buggy --optimize-for-size branch in PushMultipleTimes.

The helper would cause the stack to be unaligned during pushes which caused issues
on Arm64. PushMultipleTimes is only used once by InterpreterEntryTrampoline,
therefore it doesn't make sense to change it's behaviour for --optimize-for-size.

Change-Id: I3bc7d39bc38ffd22a3ee6cca1cdafe5d656d77b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1773275
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63443}
parent eebb18d3
...@@ -1139,20 +1139,6 @@ void MacroAssembler::PushMultipleTimes(CPURegister src, Register count) { ...@@ -1139,20 +1139,6 @@ void MacroAssembler::PushMultipleTimes(CPURegister src, Register count) {
UseScratchRegisterScope temps(this); UseScratchRegisterScope temps(this);
Register temp = temps.AcquireSameSizeAs(count); Register temp = temps.AcquireSameSizeAs(count);
if (FLAG_optimize_for_size) {
Label loop, done;
Subs(temp, count, 1);
B(mi, &done);
// Push all registers individually, to save code size.
Bind(&loop);
Subs(temp, temp, 1);
PushHelper(1, src.SizeInBytes(), src, NoReg, NoReg, NoReg);
B(pl, &loop);
Bind(&done);
} else {
Label loop, leftover2, leftover1, done; Label loop, leftover2, leftover1, done;
Subs(temp, count, 4); Subs(temp, count, 4);
...@@ -1175,7 +1161,6 @@ void MacroAssembler::PushMultipleTimes(CPURegister src, Register count) { ...@@ -1175,7 +1161,6 @@ void MacroAssembler::PushMultipleTimes(CPURegister src, Register count) {
PushHelper(1, src.SizeInBytes(), src, NoReg, NoReg, NoReg); PushHelper(1, src.SizeInBytes(), src, NoReg, NoReg, NoReg);
Bind(&done); Bind(&done);
}
} }
void TurboAssembler::PushHelper(int count, int size, const CPURegister& src0, void TurboAssembler::PushHelper(int count, int size, const CPURegister& src0,
......
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