1 // Copyright 2014 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_S390_FRAME_CONSTANTS_S390_H_ 6 #define V8_S390_FRAME_CONSTANTS_S390_H_ 7 8 namespace v8 { 9 namespace internal { 10 11 class EntryFrameConstants : public AllStatic { 12 public: 13 static constexpr int kCallerFPOffset = 14 -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); 15 }; 16 17 class ExitFrameConstants : public TypedFrameConstants { 18 public: 19 static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0); 20 static constexpr int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1); 21 DEFINE_TYPED_FRAME_SIZES(2); 22 23 // The caller fields are below the frame pointer on the stack. 24 static constexpr int kCallerFPOffset = 0 * kPointerSize; 25 // The calling JS function is below FP. 26 static constexpr int kCallerPCOffset = 1 * kPointerSize; 27 28 // FP-relative displacement of the caller's SP. It points just 29 // below the saved PC. 30 static constexpr int kCallerSPDisplacement = 2 * kPointerSize; 31 }; 32 33 class JavaScriptFrameConstants : public AllStatic { 34 public: 35 // FP-relative. 36 static constexpr int kLocal0Offset = 37 StandardFrameConstants::kExpressionsOffset; 38 static constexpr int kLastParameterOffset = +2 * kPointerSize; 39 static constexpr int kFunctionOffset = 40 StandardFrameConstants::kFunctionOffset; 41 42 // Caller SP-relative. 43 static constexpr int kParam0Offset = -2 * kPointerSize; 44 static constexpr int kReceiverOffset = -1 * kPointerSize; 45 }; 46 47 } // namespace internal 48 } // namespace v8 49 50 #endif // V8_S390_FRAME_CONSTANTS_S390_H_ 51