OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // ---------------------------------------------------- | 49 // ---------------------------------------------------- |
50 | 50 |
51 class EntryFrameConstants : public AllStatic { | 51 class EntryFrameConstants : public AllStatic { |
52 public: | 52 public: |
53 #ifdef _WIN64 | 53 #ifdef _WIN64 |
54 static const int kCalleeSaveXMMRegisters = 10; | 54 static const int kCalleeSaveXMMRegisters = 10; |
55 static const int kXMMRegisterSize = 16; | 55 static const int kXMMRegisterSize = 16; |
56 static const int kXMMRegistersBlockSize = | 56 static const int kXMMRegistersBlockSize = |
57 kXMMRegisterSize * kCalleeSaveXMMRegisters; | 57 kXMMRegisterSize * kCalleeSaveXMMRegisters; |
| 58 #ifndef V8_TARGET_ARCH_X32 |
58 static const int kCallerFPOffset = | 59 static const int kCallerFPOffset = |
59 -10 * kPointerSize - kXMMRegistersBlockSize; | 60 -10 * kPointerSize - kXMMRegistersBlockSize; |
60 #else | 61 #else |
| 62 static const int kCallerFPOffset = |
| 63 -3 * kPointerSize + -7 * kHWRegSize - kXMMRegistersBlockSize; |
| 64 #endif |
| 65 #else |
| 66 #ifndef V8_TARGET_ARCH_X32 |
61 static const int kCallerFPOffset = -8 * kPointerSize; | 67 static const int kCallerFPOffset = -8 * kPointerSize; |
| 68 #else |
| 69 static const int kCallerFPOffset = -3 * kPointerSize + -5 * kHWRegSize; |
| 70 #endif |
62 #endif | 71 #endif |
63 static const int kArgvOffset = 6 * kPointerSize; | 72 static const int kArgvOffset = 6 * kPointerSize; |
64 }; | 73 }; |
65 | 74 |
66 | 75 |
67 class ExitFrameConstants : public AllStatic { | 76 class ExitFrameConstants : public AllStatic { |
68 public: | 77 public: |
69 static const int kCodeOffset = -2 * kPointerSize; | 78 static const int kCodeOffset = -2 * kPointerSize; |
70 static const int kSPOffset = -1 * kPointerSize; | 79 static const int kSPOffset = -1 * kPointerSize; |
71 | 80 |
72 static const int kCallerFPOffset = +0 * kPointerSize; | 81 static const int kCallerFPOffset = +0 * kPointerSize; |
| 82 #ifndef V8_TARGET_ARCH_X32 |
73 static const int kCallerPCOffset = +1 * kPointerSize; | 83 static const int kCallerPCOffset = +1 * kPointerSize; |
74 | 84 |
75 // FP-relative displacement of the caller's SP. It points just | 85 // FP-relative displacement of the caller's SP. It points just |
76 // below the saved PC. | 86 // below the saved PC. |
77 static const int kCallerSPDisplacement = +2 * kPointerSize; | 87 static const int kCallerSPDisplacement = +2 * kPointerSize; |
| 88 #else |
| 89 static const int kCallerPCOffset = +1 * kHWRegSize; |
| 90 |
| 91 // FP-relative displacement of the caller's SP. It points just |
| 92 // below the saved PC. |
| 93 static const int kCallerSPDisplacement = +2 * kHWRegSize; |
| 94 #endif |
78 }; | 95 }; |
79 | 96 |
80 | 97 |
81 class JavaScriptFrameConstants : public AllStatic { | 98 class JavaScriptFrameConstants : public AllStatic { |
82 public: | 99 public: |
83 // FP-relative. | 100 // FP-relative. |
84 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; | 101 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; |
| 102 #ifndef V8_TARGET_ARCH_X32 |
85 static const int kLastParameterOffset = +2 * kPointerSize; | 103 static const int kLastParameterOffset = +2 * kPointerSize; |
| 104 #else |
| 105 static const int kLastParameterOffset = +2 * kHWRegSize; |
| 106 #endif |
86 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; | 107 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; |
87 | 108 |
88 // Caller SP-relative. | 109 // Caller SP-relative. |
89 static const int kParam0Offset = -2 * kPointerSize; | 110 static const int kParam0Offset = -2 * kPointerSize; |
90 static const int kReceiverOffset = -1 * kPointerSize; | 111 static const int kReceiverOffset = -1 * kPointerSize; |
91 }; | 112 }; |
92 | 113 |
93 | 114 |
94 class ArgumentsAdaptorFrameConstants : public AllStatic { | 115 class ArgumentsAdaptorFrameConstants : public AllStatic { |
95 public: | 116 public: |
(...skipping 26 matching lines...) Expand all Loading... |
122 | 143 |
123 | 144 |
124 inline Object* JavaScriptFrame::function_slot_object() const { | 145 inline Object* JavaScriptFrame::function_slot_object() const { |
125 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 146 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
126 return Memory::Object_at(fp() + offset); | 147 return Memory::Object_at(fp() + offset); |
127 } | 148 } |
128 | 149 |
129 } } // namespace v8::internal | 150 } } // namespace v8::internal |
130 | 151 |
131 #endif // V8_X64_FRAMES_X64_H_ | 152 #endif // V8_X64_FRAMES_X64_H_ |
OLD | NEW |