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) { ...@@ -58,9 +58,10 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp) // -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM | // -1 | 0xa: WASM |
// -2 | instance | // -2 | instance |
// -3 | feedback vector|
// -----+--------------------+--------------------------- // -----+--------------------+---------------------------
// -3 | slot 0 | ^ // -4 | slot 0 | ^
// -4 | slot 1 | | // -5 | slot 1 | |
// | | Frame slots // | | Frame slots
// | | | // | | |
// | | v // | | v
...@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) { ...@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- stack ptr (sp) // -----+--------------------+ <-- stack ptr (sp)
// //
// fp-8 holds the stack marker, fp-16 is the instance parameter. constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kInstanceOffset = 16; constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); } inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
...@@ -292,7 +293,7 @@ void LiftoffAssembler::AbortCompilation() {} ...@@ -292,7 +293,7 @@ void LiftoffAssembler::AbortCompilation() {}
// static // static
constexpr int LiftoffAssembler::StaticStackFrameSize() { constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset; return liftoff::kFeedbackVectorOffset;
} }
int LiftoffAssembler::SlotSizeForType(ValueKind kind) { int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
...@@ -55,11 +55,12 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) { ...@@ -55,11 +55,12 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp) // -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM | // -1 | 0xa: WASM |
// -2 | instance | // -2 | instance |
// -3 | feedback vector |
// -----+--------------------+--------------------------- // -----+--------------------+---------------------------
// -3 | slot 0 (high) | ^ // -4 | slot 0 (high) | ^
// -4 | slot 0 (low) | | // -5 | slot 0 (low) | |
// -5 | slot 1 (high) | Frame slots // -6 | slot 1 (high) | Frame slots
// -6 | slot 1 (low) | | // -7 | slot 1 (low) | |
// | | v // | | v
// -----+--------------------+ <-- stack ptr (sp) // -----+--------------------+ <-- stack ptr (sp)
// //
...@@ -71,8 +72,8 @@ constexpr int32_t kLowWordOffset = 0; ...@@ -71,8 +72,8 @@ constexpr int32_t kLowWordOffset = 0;
constexpr int32_t kHighWordOffset = 4; constexpr int32_t kHighWordOffset = 4;
#endif #endif
// fp-4 holds the stack marker, fp-8 is the instance parameter. constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kInstanceOffset = 8; constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); } inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
...@@ -421,7 +422,7 @@ void LiftoffAssembler::AbortCompilation() {} ...@@ -421,7 +422,7 @@ void LiftoffAssembler::AbortCompilation() {}
// static // static
constexpr int LiftoffAssembler::StaticStackFrameSize() { constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset; return liftoff::kFeedbackVectorOffset;
} }
int LiftoffAssembler::SlotSizeForType(ValueKind kind) { int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
......
...@@ -58,9 +58,10 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) { ...@@ -58,9 +58,10 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- frame ptr (fp) // -----+--------------------+ <-- frame ptr (fp)
// -1 | 0xa: WASM | // -1 | 0xa: WASM |
// -2 | instance | // -2 | instance |
// -3 | feedback vector|
// -----+--------------------+--------------------------- // -----+--------------------+---------------------------
// -3 | slot 0 | ^ // -4 | slot 0 | ^
// -4 | slot 1 | | // -5 | slot 1 | |
// | | Frame slots // | | Frame slots
// | | | // | | |
// | | v // | | v
...@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) { ...@@ -68,8 +69,8 @@ inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
// -----+--------------------+ <-- stack ptr (sp) // -----+--------------------+ <-- stack ptr (sp)
// //
// fp-8 holds the stack marker, fp-16 is the instance parameter. constexpr int kInstanceOffset = 2 * kSystemPointerSize;
constexpr int kInstanceOffset = 16; constexpr int kFeedbackVectorOffset = 3 * kSystemPointerSize;
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); } inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
...@@ -408,7 +409,7 @@ void LiftoffAssembler::AbortCompilation() {} ...@@ -408,7 +409,7 @@ void LiftoffAssembler::AbortCompilation() {}
// static // static
constexpr int LiftoffAssembler::StaticStackFrameSize() { constexpr int LiftoffAssembler::StaticStackFrameSize() {
return liftoff::kInstanceOffset; return liftoff::kFeedbackVectorOffset;
} }
int LiftoffAssembler::SlotSizeForType(ValueKind kind) { 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