summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/frame-constants-x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x64/frame-constants-x64.h')
-rw-r--r--deps/v8/src/x64/frame-constants-x64.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/deps/v8/src/x64/frame-constants-x64.h b/deps/v8/src/x64/frame-constants-x64.h
index 5658aaebea..21f51a096d 100644
--- a/deps/v8/src/x64/frame-constants-x64.h
+++ b/deps/v8/src/x64/frame-constants-x64.h
@@ -18,13 +18,26 @@ class EntryFrameConstants : public AllStatic {
static constexpr int kXMMRegisterSize = 16;
static constexpr int kXMMRegistersBlockSize =
kXMMRegisterSize * kCalleeSaveXMMRegisters;
+
+ // This is the offset to where JSEntry pushes the current value of
+ // Isolate::c_entry_fp onto the stack.
+ // On x64, there are 7 pushq() and 3 Push() calls between setting up rbp and
+ // pushing the c_entry_fp, plus we manually allocate kXMMRegistersBlockSize
+ // bytes on the stack.
static constexpr int kCallerFPOffset =
- -3 * kPointerSize + -7 * kRegisterSize - kXMMRegistersBlockSize;
+ -3 * kSystemPointerSize + -7 * kRegisterSize - kXMMRegistersBlockSize;
+
+ // Stack offsets for arguments passed to JSEntry.
+ static constexpr int kArgcOffset = 6 * kSystemPointerSize;
+ static constexpr int kArgvOffset = 7 * kSystemPointerSize;
#else
- // We have 3 Push and 5 pushq in the JSEntryStub::GenerateBody.
- static constexpr int kCallerFPOffset = -3 * kPointerSize + -5 * kRegisterSize;
+ // This is the offset to where JSEntry pushes the current value of
+ // Isolate::c_entry_fp onto the stack.
+ // On x64, there are 5 pushq() and 3 Push() calls between setting up rbp and
+ // pushing the c_entry_fp.
+ static constexpr int kCallerFPOffset =
+ -3 * kSystemPointerSize + -5 * kRegisterSize;
#endif
- static constexpr int kArgvOffset = 6 * kPointerSize;
};
class ExitFrameConstants : public TypedFrameConstants {
@@ -33,7 +46,7 @@ class ExitFrameConstants : public TypedFrameConstants {
static constexpr int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1);
DEFINE_TYPED_FRAME_SIZES(2);
- static constexpr int kCallerFPOffset = +0 * kPointerSize;
+ static constexpr int kCallerFPOffset = +0 * kSystemPointerSize;
static constexpr int kCallerPCOffset = kFPOnStackSize;
// FP-relative displacement of the caller's SP. It points just
@@ -52,7 +65,7 @@ class WasmCompileLazyFrameConstants : public TypedFrameConstants {
static constexpr int kWasmInstanceOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
static constexpr int kFixedFrameSizeFromFp =
TypedFrameConstants::kFixedFrameSizeFromFp +
- kNumberOfSavedGpParamRegs * kPointerSize +
+ kNumberOfSavedGpParamRegs * kSystemPointerSize +
kNumberOfSavedFpParamRegs * kSimd128Size;
};
@@ -66,8 +79,8 @@ class JavaScriptFrameConstants : public AllStatic {
StandardFrameConstants::kFunctionOffset;
// Caller SP-relative.
- static constexpr int kParam0Offset = -2 * kPointerSize;
- static constexpr int kReceiverOffset = -1 * kPointerSize;
+ static constexpr int kParam0Offset = -2 * kSystemPointerSize;
+ static constexpr int kReceiverOffset = -1 * kSystemPointerSize;
};
} // namespace internal