OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace v8 { | 33 namespace v8 { |
34 namespace internal { | 34 namespace internal { |
35 | 35 |
36 | 36 |
37 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); | 37 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); |
38 | 38 |
39 | 39 |
40 class StoreBufferOverflowStub: public PlatformCodeStub { | 40 class StoreBufferOverflowStub: public PlatformCodeStub { |
41 public: | 41 public: |
42 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) | 42 StoreBufferOverflowStub(Isolate* isolate, SaveFPRegsMode save_fp) |
43 : save_doubles_(save_fp) { } | 43 : PlatformCodeStub(isolate), save_doubles_(save_fp) { } |
44 | 44 |
45 void Generate(MacroAssembler* masm); | 45 void Generate(MacroAssembler* masm); |
46 | 46 |
47 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 47 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
48 virtual bool SometimesSetsUpAFrame() { return false; } | 48 virtual bool SometimesSetsUpAFrame() { return false; } |
49 | 49 |
50 private: | 50 private: |
51 SaveFPRegsMode save_doubles_; | 51 SaveFPRegsMode save_doubles_; |
52 | 52 |
53 Major MajorKey() { return StoreBufferOverflow; } | 53 Major MajorKey() { return StoreBufferOverflow; } |
(...skipping 18 matching lines...) Expand all Loading... |
72 Register hash, | 72 Register hash, |
73 Register scratch); | 73 Register scratch); |
74 | 74 |
75 private: | 75 private: |
76 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
80 class StoreRegistersStateStub: public PlatformCodeStub { | 80 class StoreRegistersStateStub: public PlatformCodeStub { |
81 public: | 81 public: |
82 explicit StoreRegistersStateStub(SaveFPRegsMode with_fp) | 82 StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode with_fp) |
83 : save_doubles_(with_fp) {} | 83 : PlatformCodeStub(isolate), save_doubles_(with_fp) {} |
84 | 84 |
85 static Register to_be_pushed_lr() { return ip0; } | 85 static Register to_be_pushed_lr() { return ip0; } |
86 static void GenerateAheadOfTime(Isolate* isolate); | 86 static void GenerateAheadOfTime(Isolate* isolate); |
87 private: | 87 private: |
88 Major MajorKey() { return StoreRegistersState; } | 88 Major MajorKey() { return StoreRegistersState; } |
89 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 89 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
90 SaveFPRegsMode save_doubles_; | 90 SaveFPRegsMode save_doubles_; |
91 | 91 |
92 void Generate(MacroAssembler* masm); | 92 void Generate(MacroAssembler* masm); |
93 }; | 93 }; |
94 | 94 |
95 | 95 |
96 class RestoreRegistersStateStub: public PlatformCodeStub { | 96 class RestoreRegistersStateStub: public PlatformCodeStub { |
97 public: | 97 public: |
98 explicit RestoreRegistersStateStub(SaveFPRegsMode with_fp) | 98 RestoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode with_fp) |
99 : save_doubles_(with_fp) {} | 99 : PlatformCodeStub(isolate), save_doubles_(with_fp) {} |
100 | 100 |
101 static void GenerateAheadOfTime(Isolate* isolate); | 101 static void GenerateAheadOfTime(Isolate* isolate); |
102 private: | 102 private: |
103 Major MajorKey() { return RestoreRegistersState; } | 103 Major MajorKey() { return RestoreRegistersState; } |
104 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 104 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
105 SaveFPRegsMode save_doubles_; | 105 SaveFPRegsMode save_doubles_; |
106 | 106 |
107 void Generate(MacroAssembler* masm); | 107 void Generate(MacroAssembler* masm); |
108 }; | 108 }; |
109 | 109 |
110 | 110 |
111 class RecordWriteStub: public PlatformCodeStub { | 111 class RecordWriteStub: public PlatformCodeStub { |
112 public: | 112 public: |
113 // Stub to record the write of 'value' at 'address' in 'object'. | 113 // Stub to record the write of 'value' at 'address' in 'object'. |
114 // Typically 'address' = 'object' + <some offset>. | 114 // Typically 'address' = 'object' + <some offset>. |
115 // See MacroAssembler::RecordWriteField() for example. | 115 // See MacroAssembler::RecordWriteField() for example. |
116 RecordWriteStub(Register object, | 116 RecordWriteStub(Isolate* isolate, |
| 117 Register object, |
117 Register value, | 118 Register value, |
118 Register address, | 119 Register address, |
119 RememberedSetAction remembered_set_action, | 120 RememberedSetAction remembered_set_action, |
120 SaveFPRegsMode fp_mode) | 121 SaveFPRegsMode fp_mode) |
121 : object_(object), | 122 : PlatformCodeStub(isolate), |
| 123 object_(object), |
122 value_(value), | 124 value_(value), |
123 address_(address), | 125 address_(address), |
124 remembered_set_action_(remembered_set_action), | 126 remembered_set_action_(remembered_set_action), |
125 save_fp_regs_mode_(fp_mode), | 127 save_fp_regs_mode_(fp_mode), |
126 regs_(object, // An input reg. | 128 regs_(object, // An input reg. |
127 address, // An input reg. | 129 address, // An input reg. |
128 value) { // One scratch reg. | 130 value) { // One scratch reg. |
129 } | 131 } |
130 | 132 |
131 enum Mode { | 133 enum Mode { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 SaveFPRegsMode save_fp_regs_mode_; | 365 SaveFPRegsMode save_fp_regs_mode_; |
364 Label slow_; | 366 Label slow_; |
365 RegisterAllocation regs_; | 367 RegisterAllocation regs_; |
366 }; | 368 }; |
367 | 369 |
368 | 370 |
369 // Helper to call C++ functions from generated code. The caller must prepare | 371 // Helper to call C++ functions from generated code. The caller must prepare |
370 // the exit frame before doing the call with GenerateCall. | 372 // the exit frame before doing the call with GenerateCall. |
371 class DirectCEntryStub: public PlatformCodeStub { | 373 class DirectCEntryStub: public PlatformCodeStub { |
372 public: | 374 public: |
373 DirectCEntryStub() {} | 375 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
374 void Generate(MacroAssembler* masm); | 376 void Generate(MacroAssembler* masm); |
375 void GenerateCall(MacroAssembler* masm, Register target); | 377 void GenerateCall(MacroAssembler* masm, Register target); |
376 | 378 |
377 private: | 379 private: |
378 Major MajorKey() { return DirectCEntry; } | 380 Major MajorKey() { return DirectCEntry; } |
379 int MinorKey() { return 0; } | 381 int MinorKey() { return 0; } |
380 | 382 |
381 bool NeedsImmovableCode() { return true; } | 383 bool NeedsImmovableCode() { return true; } |
382 }; | 384 }; |
383 | 385 |
384 | 386 |
385 class NameDictionaryLookupStub: public PlatformCodeStub { | 387 class NameDictionaryLookupStub: public PlatformCodeStub { |
386 public: | 388 public: |
387 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 389 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
388 | 390 |
389 explicit NameDictionaryLookupStub(LookupMode mode) : mode_(mode) { } | 391 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) |
| 392 : PlatformCodeStub(isolate), mode_(mode) { } |
390 | 393 |
391 void Generate(MacroAssembler* masm); | 394 void Generate(MacroAssembler* masm); |
392 | 395 |
393 static void GenerateNegativeLookup(MacroAssembler* masm, | 396 static void GenerateNegativeLookup(MacroAssembler* masm, |
394 Label* miss, | 397 Label* miss, |
395 Label* done, | 398 Label* done, |
396 Register receiver, | 399 Register receiver, |
397 Register properties, | 400 Register properties, |
398 Handle<Name> name, | 401 Handle<Name> name, |
399 Register scratch0); | 402 Register scratch0); |
(...skipping 27 matching lines...) Expand all Loading... |
427 } | 430 } |
428 | 431 |
429 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 432 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
430 | 433 |
431 LookupMode mode_; | 434 LookupMode mode_; |
432 }; | 435 }; |
433 | 436 |
434 | 437 |
435 class SubStringStub: public PlatformCodeStub { | 438 class SubStringStub: public PlatformCodeStub { |
436 public: | 439 public: |
437 SubStringStub() {} | 440 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
438 | 441 |
439 private: | 442 private: |
440 Major MajorKey() { return SubString; } | 443 Major MajorKey() { return SubString; } |
441 int MinorKey() { return 0; } | 444 int MinorKey() { return 0; } |
442 | 445 |
443 void Generate(MacroAssembler* masm); | 446 void Generate(MacroAssembler* masm); |
444 }; | 447 }; |
445 | 448 |
446 | 449 |
447 class StringCompareStub: public PlatformCodeStub { | 450 class StringCompareStub: public PlatformCodeStub { |
448 public: | 451 public: |
449 StringCompareStub() { } | 452 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { } |
450 | 453 |
451 // Compares two flat ASCII strings and returns result in x0. | 454 // Compares two flat ASCII strings and returns result in x0. |
452 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, | 455 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
453 Register left, | 456 Register left, |
454 Register right, | 457 Register right, |
455 Register scratch1, | 458 Register scratch1, |
456 Register scratch2, | 459 Register scratch2, |
457 Register scratch3, | 460 Register scratch3, |
458 Register scratch4); | 461 Register scratch4); |
459 | 462 |
(...skipping 29 matching lines...) Expand all Loading... |
489 TargetAddressStorageMode storage_mode() { return storage_mode_; } | 492 TargetAddressStorageMode storage_mode() { return storage_mode_; } |
490 | 493 |
491 private: | 494 private: |
492 TargetAddressStorageMode storage_mode_; | 495 TargetAddressStorageMode storage_mode_; |
493 }; | 496 }; |
494 | 497 |
495 | 498 |
496 } } // namespace v8::internal | 499 } } // namespace v8::internal |
497 | 500 |
498 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ | 501 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ |
OLD | NEW |