[execution] Make {ExitFrameConstants} arch-independent.

R=clemensb@chromium.org
BUG=v8:9810

Change-Id: I4bfd667952cb933a131701c692cad18857df2244
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1878711
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64562}
This commit is contained in:
Michael Starzinger 2019-10-24 17:12:48 +02:00 committed by Commit Bot
parent f602d2c8b1
commit 1a04ec3372
9 changed files with 11 additions and 122 deletions

View File

@ -23,21 +23,6 @@ class EntryFrameConstants : public AllStatic {
static constexpr int kArgvOffset = +1 * kSystemPointerSize;
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = 0 * kPointerSize;
// The calling JS function is below FP.
static constexpr int kCallerPCOffset = 1 * kPointerSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = 2 * kPointerSize;
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 4;

View File

@ -73,15 +73,6 @@ class EntryFrameConstants : public AllStatic {
kCalleeSavedRegisterBytesPushedBeforeFpLrPair;
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
static constexpr int kLastExitFrameField = kSPOffset;
static constexpr int kConstantPoolOffset = 0; // Not used
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 8;

View File

@ -292,6 +292,17 @@ class BuiltinContinuationFrameConstants : public TypedFrameConstants {
static int PaddingSlotCount(int register_count);
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
static constexpr int kLastExitFrameField = kSPOffset;
DEFINE_TYPED_FRAME_SIZES(1);
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = kCallerSPOffset;
};
// Behaves like an exit frame but with target and new target args.
class BuiltinExitFrameConstants : public CommonFrameConstants {
public:

View File

@ -32,21 +32,6 @@ class EntryFrameConstants : public AllStatic {
static constexpr int kMicrotaskQueueArgOffset = +3 * kSystemPointerSize;
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
static constexpr int kCallerFPOffset = 0 * kSystemPointerSize;
static constexpr int kCallerPCOffset = +1 * kSystemPointerSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = +2 * kSystemPointerSize;
static constexpr int kConstantPoolOffset = 0; // Not used
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 4;

View File

@ -23,25 +23,6 @@ class EntryFrameConstants : public AllStatic {
static constexpr int kArgvOffset = +1 * kSystemPointerSize;
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = +0 * kPointerSize;
// The calling JS function is between FP and PC.
static constexpr int kCallerPCOffset = +1 * kPointerSize;
// MIPS-specific: a pointer to the old sp to avoid unnecessary calculations.
static constexpr int kCallerSPOffset = +2 * kPointerSize;
// FP-relative displacement of the caller's SP.
static constexpr int kCallerSPDisplacement = +2 * kPointerSize;
static constexpr int kConstantPoolOffset = 0; // Not used.
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 3;

View File

@ -19,25 +19,6 @@ class EntryFrameConstants : public AllStatic {
-(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize);
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = +0 * kPointerSize;
// The calling JS function is between FP and PC.
static constexpr int kCallerPCOffset = +1 * kPointerSize;
// MIPS-specific: a pointer to the old sp to avoid unnecessary calculations.
static constexpr int kCallerSPOffset = +2 * kPointerSize;
// FP-relative displacement of the caller's SP.
static constexpr int kCallerSPDisplacement = +2 * kPointerSize;
static constexpr int kConstantPoolOffset = 0; // Not used.
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 7;

View File

@ -17,21 +17,6 @@ class EntryFrameConstants : public AllStatic {
-(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize);
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = 0 * kPointerSize;
// The calling JS function is below FP.
static constexpr int kCallerPCOffset = 1 * kPointerSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = 2 * kPointerSize;
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 7;

View File

@ -19,21 +19,6 @@ class EntryFrameConstants : public AllStatic {
static constexpr int kArgvOffset = 20 * kSystemPointerSize;
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = 0 * kSystemPointerSize;
// The calling JS function is below FP.
static constexpr int kCallerPCOffset = 1 * kSystemPointerSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = 2 * kSystemPointerSize;
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 4;

View File

@ -41,21 +41,6 @@ class EntryFrameConstants : public AllStatic {
#endif
};
class ExitFrameConstants : public TypedFrameConstants {
public:
static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
DEFINE_TYPED_FRAME_SIZES(1);
static constexpr int kCallerFPOffset = +0 * kSystemPointerSize;
static constexpr int kCallerPCOffset = kFPOnStackSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = kCallerPCOffset + kPCOnStackSize;
static constexpr int kConstantPoolOffset = 0; // Not used
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
public:
static constexpr int kNumberOfSavedGpParamRegs = 6;