OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ | 5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ |
6 #define V8_ARM64_CODE_STUBS_ARM64_H_ | 6 #define V8_ARM64_CODE_STUBS_ARM64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 class StoreRegistersStateStub: public PlatformCodeStub { | 38 class StoreRegistersStateStub: public PlatformCodeStub { |
39 public: | 39 public: |
40 explicit StoreRegistersStateStub(Isolate* isolate) | 40 explicit StoreRegistersStateStub(Isolate* isolate) |
41 : PlatformCodeStub(isolate) {} | 41 : PlatformCodeStub(isolate) {} |
42 | 42 |
43 static Register to_be_pushed_lr() { return ip0; } | 43 static Register to_be_pushed_lr() { return ip0; } |
44 | 44 |
45 static void GenerateAheadOfTime(Isolate* isolate); | 45 static void GenerateAheadOfTime(Isolate* isolate); |
46 | 46 |
47 private: | 47 private: |
| 48 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
48 DEFINE_PLATFORM_CODE_STUB(StoreRegistersState, PlatformCodeStub); | 49 DEFINE_PLATFORM_CODE_STUB(StoreRegistersState, PlatformCodeStub); |
49 }; | 50 }; |
50 | 51 |
51 | 52 |
52 class RestoreRegistersStateStub: public PlatformCodeStub { | 53 class RestoreRegistersStateStub: public PlatformCodeStub { |
53 public: | 54 public: |
54 explicit RestoreRegistersStateStub(Isolate* isolate) | 55 explicit RestoreRegistersStateStub(Isolate* isolate) |
55 : PlatformCodeStub(isolate) {} | 56 : PlatformCodeStub(isolate) {} |
56 | 57 |
57 static void GenerateAheadOfTime(Isolate* isolate); | 58 static void GenerateAheadOfTime(Isolate* isolate); |
58 | 59 |
59 private: | 60 private: |
| 61 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
60 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); | 62 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); |
61 }; | 63 }; |
62 | 64 |
63 | 65 |
64 class RecordWriteStub: public PlatformCodeStub { | 66 class RecordWriteStub: public PlatformCodeStub { |
65 public: | 67 public: |
66 // Stub to record the write of 'value' at 'address' in 'object'. | 68 // Stub to record the write of 'value' at 'address' in 'object'. |
67 // Typically 'address' = 'object' + <some offset>. | 69 // Typically 'address' = 'object' + <some offset>. |
68 // See MacroAssembler::RecordWriteField() for example. | 70 // See MacroAssembler::RecordWriteField() for example. |
69 RecordWriteStub(Isolate* isolate, | 71 RecordWriteStub(Isolate* isolate, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 break; | 155 break; |
154 case INCREMENTAL_COMPACTION: | 156 case INCREMENTAL_COMPACTION: |
155 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); | 157 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); |
156 patcher.adr(xzr, offset_to_incremental_noncompacting); | 158 patcher.adr(xzr, offset_to_incremental_noncompacting); |
157 patcher.b(offset_to_incremental_compacting >> kInstructionSizeLog2); | 159 patcher.b(offset_to_incremental_compacting >> kInstructionSizeLog2); |
158 break; | 160 break; |
159 } | 161 } |
160 DCHECK(GetMode(stub) == mode); | 162 DCHECK(GetMode(stub) == mode); |
161 } | 163 } |
162 | 164 |
| 165 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 166 |
163 private: | 167 private: |
164 // This is a helper class to manage the registers associated with the stub. | 168 // This is a helper class to manage the registers associated with the stub. |
165 // The 'object' and 'address' registers must be preserved. | 169 // The 'object' and 'address' registers must be preserved. |
166 class RegisterAllocation { | 170 class RegisterAllocation { |
167 public: | 171 public: |
168 RegisterAllocation(Register object, | 172 RegisterAllocation(Register object, |
169 Register address, | 173 Register address, |
170 Register scratch) | 174 Register scratch) |
171 : object_(object), | 175 : object_(object), |
172 address_(address), | 176 address_(address), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // Helper to call C++ functions from generated code. The caller must prepare | 323 // Helper to call C++ functions from generated code. The caller must prepare |
320 // the exit frame before doing the call with GenerateCall. | 324 // the exit frame before doing the call with GenerateCall. |
321 class DirectCEntryStub: public PlatformCodeStub { | 325 class DirectCEntryStub: public PlatformCodeStub { |
322 public: | 326 public: |
323 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 327 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
324 void GenerateCall(MacroAssembler* masm, Register target); | 328 void GenerateCall(MacroAssembler* masm, Register target); |
325 | 329 |
326 private: | 330 private: |
327 bool NeedsImmovableCode() { return true; } | 331 bool NeedsImmovableCode() { return true; } |
328 | 332 |
| 333 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
329 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); | 334 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); |
330 }; | 335 }; |
331 | 336 |
332 | 337 |
333 class NameDictionaryLookupStub: public PlatformCodeStub { | 338 class NameDictionaryLookupStub: public PlatformCodeStub { |
334 public: | 339 public: |
335 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 340 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
336 | 341 |
337 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) | 342 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) |
338 : PlatformCodeStub(isolate) { | 343 : PlatformCodeStub(isolate) { |
(...skipping 27 matching lines...) Expand all Loading... |
366 NameDictionary::kCapacityIndex * kPointerSize; | 371 NameDictionary::kCapacityIndex * kPointerSize; |
367 | 372 |
368 static const int kElementsStartOffset = | 373 static const int kElementsStartOffset = |
369 NameDictionary::kHeaderSize + | 374 NameDictionary::kHeaderSize + |
370 NameDictionary::kElementsStartIndex * kPointerSize; | 375 NameDictionary::kElementsStartIndex * kPointerSize; |
371 | 376 |
372 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 377 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
373 | 378 |
374 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 379 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
375 | 380 |
| 381 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
376 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 382 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
377 }; | 383 }; |
378 | 384 |
379 } } // namespace v8::internal | 385 } } // namespace v8::internal |
380 | 386 |
381 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ | 387 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ |
OLD | NEW |