Commit a3a13baa authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[arm64] Eliminate unnecessary RoundUp call for returns

- arm64 aligns the frame, which guarantees an even
  number of return slots. Change RoundUp call to DCHECK.

Bug: v8:9198
Change-Id: I9a6949b93d14109f83f09800ffe75ebba6387b04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2740481Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73274}
parent d14225d0
......@@ -3050,9 +3050,9 @@ void CodeGenerator::AssembleConstructFrame() {
CPURegList saves_fp = CPURegList(CPURegister::kVRegister, kDRegSizeInBits,
call_descriptor->CalleeSavedFPRegisters());
DCHECK_EQ(saves_fp.Count() % 2, 0);
// The number of slots for returns has to be even to ensure the correct stack
// alignment.
const int returns = RoundUp(frame()->GetReturnSlotCount(), 2);
// The number of return slots should be even after aligning the Frame.
const int returns = frame()->GetReturnSlotCount();
DCHECK_EQ(returns % 2, 0);
if (frame_access_state()->has_frame()) {
// Link the frame
......
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