Commit 7b6b216f authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm][liftoff] Add comment to reserving stack space

R=clemensb@chromium.org

Bug: v8:11074
Change-Id: I43036a826008027cf44179f1236f4feb9ef4c83b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554608Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71372}
parent 32e92f80
......@@ -182,6 +182,10 @@ inline void EmitAllTrue(LiftoffAssembler* assm, LiftoffRegister dst,
int LiftoffAssembler::PrepareStackFrame() {
int offset = pc_offset();
InstructionAccurateScope scope(this, 1);
// Next we reserve the memory for the whole stack frame. We do not know yet
// how big the stack frame will be so we just emit a placeholder instruction.
// PatchPrepareStackFrame will patch this in order to increase the stack
// appropriately.
sub(sp, sp, 0);
return offset;
}
......
......@@ -159,6 +159,10 @@ constexpr int kSubSpSize = 6; // 6 bytes for "sub esp, <imm32>"
int LiftoffAssembler::PrepareStackFrame() {
int offset = pc_offset();
// Next we reserve the memory for the whole stack frame. We do not know yet
// how big the stack frame will be so we just emit a placeholder instruction.
// PatchPrepareStackFrame will patch this in order to increase the stack
// appropriately.
sub_sp_32(0);
DCHECK_EQ(liftoff::kSubSpSize, pc_offset() - offset);
return offset;
......
......@@ -133,6 +133,10 @@ constexpr int kSubSpSize = 7; // 7 bytes for "subq rsp, <imm32>"
int LiftoffAssembler::PrepareStackFrame() {
int offset = pc_offset();
// Next we reserve the memory for the whole stack frame. We do not know yet
// how big the stack frame will be so we just emit a placeholder instruction.
// PatchPrepareStackFrame will patch this in order to increase the stack
// appropriately.
sub_sp_32(0);
DCHECK_EQ(liftoff::kSubSpSize, pc_offset() - offset);
return offset;
......
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