Commit 4413ae63 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [wasm-gc][liftoff] Reserve a stack slot for feedback

Port 9d3c9d47

Original Commit Message:

    So far the slot is set to 0; in an upcoming CL it will be
    used for an actual feedback vector.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Idbaa1d11fbfe81cf1106e4796c82ae6a1d6c1a11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3212330Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77289}
parent b7e3bd9d
......@@ -32,11 +32,12 @@ namespace liftoff {
// -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM |
// -2 | instance |
// -3 | feedback vector |
// -----+--------------------+---------------------------
// -3 | slot 0 (high) | ^
// -4 | slot 0 (low) | |
// -5 | slot 1 (high) | Frame slots
// -6 | slot 1 (low) | |
// -4 | slot 0 (high) | ^
// -5 | slot 0 (low) | |
// -6 | slot 1 (high) | Frame slots
// -7 | slot 1 (low) | |
// | | v
// -----+--------------------+ <-- stack ptr (sp)
//
......@@ -44,6 +45,8 @@ namespace liftoff {
constexpr int32_t kInstanceOffset =
(FLAG_enable_embedded_constant_pool ? 3 : 2) * kSystemPointerSize;
constexpr int kFeedbackVectorOffset =
(FLAG_enable_embedded_constant_pool ? 4 : 3) * kSystemPointerSize;
inline MemOperand GetHalfStackSlot(int offset, RegPairHalf half) {
int32_t half_offset =
......@@ -215,7 +218,7 @@ void LiftoffAssembler::AbortCompilation() { FinishCode(); }
// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset;
return liftoff::kFeedbackVectorOffset;
}
int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
......@@ -73,15 +73,17 @@ inline constexpr bool UseSignedOp(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM |
// -2 | instance |
// -3 | feedback vector |
// -----+--------------------+---------------------------
// -3 | slot 0 (high) | ^
// -4 | slot 0 (low) | |
// -5 | slot 1 (high) | Frame slots
// -6 | slot 1 (low) | |
// -4 | slot 0 (high) | ^
// -5 | slot 0 (low) | |
// -6 | slot 1 (high) | Frame slots
// -7 | slot 1 (low) | |
// | | v
// -----+--------------------+ <-- stack ptr (sp)
//
constexpr int32_t kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(uint32_t offset) {
return MemOperand(fp, -offset);
......@@ -197,7 +199,7 @@ void LiftoffAssembler::AbortCompilation() { AbortedCodeGeneration(); }
// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset;
return liftoff::kFeedbackVectorOffset;
}
int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
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