Commit 316f02f4 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

[mips][loong64][wasm-gc][liftoff] Reserve a stack slot for feedback

Port: 9d3c9d47

Bug: v8:7748

Change-Id: Id2fbd5c8dd5be1ea1932f48c03657f636bfb28bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3213351Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#77293}
parent 166dde5d
......@@ -58,9 +58,10 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM |
// -2 | instance |
// -3 | feedback vector|
// -----+--------------------+---------------------------
// -3 | slot 0 | ^
// -4 | slot 1 | |
// -4 | slot 0 | ^
// -5 | slot 1 | |
// | | Frame slots
// | | |
// | | v
......@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- stack ptr (sp)
//
// fp-8 holds the stack marker, fp-16 is the instance parameter.
constexpr int kInstanceOffset = 16;
constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
......@@ -292,7 +293,7 @@ void LiftoffAssembler::AbortCompilation() {}
// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset;
return liftoff::kFeedbackVectorOffset;
}
int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
......@@ -55,11 +55,12 @@ inline constexpr Condition ToCondition(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)
//
......@@ -71,8 +72,8 @@ constexpr int32_t kLowWordOffset = 0;
constexpr int32_t kHighWordOffset = 4;
#endif
// fp-4 holds the stack marker, fp-8 is the instance parameter.
constexpr int kInstanceOffset = 8;
constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
......@@ -421,7 +422,7 @@ void LiftoffAssembler::AbortCompilation() {}
// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset;
return liftoff::kFeedbackVectorOffset;
}
int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
......@@ -58,9 +58,10 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM |
// -2 | instance |
// -3 | feedback vector|
// -----+--------------------+---------------------------
// -3 | slot 0 | ^
// -4 | slot 1 | |
// -4 | slot 0 | ^
// -5 | slot 1 | |
// | | Frame slots
// | | |
// | | v
......@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- stack ptr (sp)
//
// fp-8 holds the stack marker, fp-16 is the instance parameter.
constexpr int kInstanceOffset = 16;
constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
......@@ -408,7 +409,7 @@ void LiftoffAssembler::AbortCompilation() {}
// 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