| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_MIPS_CODE_STUBS_ARM_H_ | 5 #ifndef V8_MIPS_CODE_STUBS_ARM_H_ |
| 6 #define V8_MIPS_CODE_STUBS_ARM_H_ | 6 #define V8_MIPS_CODE_STUBS_ARM_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 | 49 |
| 50 class StoreRegistersStateStub: public PlatformCodeStub { | 50 class StoreRegistersStateStub: public PlatformCodeStub { |
| 51 public: | 51 public: |
| 52 explicit StoreRegistersStateStub(Isolate* isolate) | 52 explicit StoreRegistersStateStub(Isolate* isolate) |
| 53 : PlatformCodeStub(isolate) {} | 53 : PlatformCodeStub(isolate) {} |
| 54 | 54 |
| 55 static void GenerateAheadOfTime(Isolate* isolate); | 55 static void GenerateAheadOfTime(Isolate* isolate); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 58 DEFINE_PLATFORM_CODE_STUB(StoreRegistersState, PlatformCodeStub); | 59 DEFINE_PLATFORM_CODE_STUB(StoreRegistersState, PlatformCodeStub); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 | 62 |
| 62 class RestoreRegistersStateStub: public PlatformCodeStub { | 63 class RestoreRegistersStateStub: public PlatformCodeStub { |
| 63 public: | 64 public: |
| 64 explicit RestoreRegistersStateStub(Isolate* isolate) | 65 explicit RestoreRegistersStateStub(Isolate* isolate) |
| 65 : PlatformCodeStub(isolate) {} | 66 : PlatformCodeStub(isolate) {} |
| 66 | 67 |
| 67 static void GenerateAheadOfTime(Isolate* isolate); | 68 static void GenerateAheadOfTime(Isolate* isolate); |
| 68 | 69 |
| 69 private: | 70 private: |
| 71 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 70 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); | 72 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 | 75 |
| 74 // This stub can convert a signed int32 to a heap number (double). It does | 76 // This stub can convert a signed int32 to a heap number (double). It does |
| 75 // not work for int32s that are in Smi range! No GC occurs during this stub | 77 // not work for int32s that are in Smi range! No GC occurs during this stub |
| 76 // so you don't have to set up the frame. | 78 // so you don't have to set up the frame. |
| 77 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { | 79 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { |
| 78 public: | 80 public: |
| 79 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, | 81 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 108 Register sign() const { | 110 Register sign() const { |
| 109 return Register::from_code(SignRegisterBits::decode(minor_key_)); | 111 return Register::from_code(SignRegisterBits::decode(minor_key_)); |
| 110 } | 112 } |
| 111 | 113 |
| 112 // Minor key encoding in 16 bits. | 114 // Minor key encoding in 16 bits. |
| 113 class IntRegisterBits: public BitField<int, 0, 4> {}; | 115 class IntRegisterBits: public BitField<int, 0, 4> {}; |
| 114 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; | 116 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; |
| 115 class ScratchRegisterBits: public BitField<int, 8, 4> {}; | 117 class ScratchRegisterBits: public BitField<int, 8, 4> {}; |
| 116 class SignRegisterBits: public BitField<int, 12, 4> {}; | 118 class SignRegisterBits: public BitField<int, 12, 4> {}; |
| 117 | 119 |
| 120 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 118 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); | 121 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 | 124 |
| 122 class RecordWriteStub: public PlatformCodeStub { | 125 class RecordWriteStub: public PlatformCodeStub { |
| 123 public: | 126 public: |
| 124 RecordWriteStub(Isolate* isolate, | 127 RecordWriteStub(Isolate* isolate, |
| 125 Register object, | 128 Register object, |
| 126 Register value, | 129 Register value, |
| 127 Register address, | 130 Register address, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 case INCREMENTAL_COMPACTION: | 204 case INCREMENTAL_COMPACTION: |
| 202 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); | 205 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); |
| 203 PatchNopIntoBranch(&masm, 2 * Assembler::kInstrSize); | 206 PatchNopIntoBranch(&masm, 2 * Assembler::kInstrSize); |
| 204 break; | 207 break; |
| 205 } | 208 } |
| 206 DCHECK(GetMode(stub) == mode); | 209 DCHECK(GetMode(stub) == mode); |
| 207 CpuFeatures::FlushICache(stub->instruction_start(), | 210 CpuFeatures::FlushICache(stub->instruction_start(), |
| 208 4 * Assembler::kInstrSize); | 211 4 * Assembler::kInstrSize); |
| 209 } | 212 } |
| 210 | 213 |
| 214 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 215 |
| 211 private: | 216 private: |
| 212 // This is a helper class for freeing up 3 scratch registers. The input is | 217 // This is a helper class for freeing up 3 scratch registers. The input is |
| 213 // two registers that must be preserved and one scratch register provided by | 218 // two registers that must be preserved and one scratch register provided by |
| 214 // the caller. | 219 // the caller. |
| 215 class RegisterAllocation { | 220 class RegisterAllocation { |
| 216 public: | 221 public: |
| 217 RegisterAllocation(Register object, | 222 RegisterAllocation(Register object, |
| 218 Register address, | 223 Register address, |
| 219 Register scratch0) | 224 Register scratch0) |
| 220 : object_(object), | 225 : object_(object), |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // simplest approach is to generate such stub early enough so it can never be | 330 // simplest approach is to generate such stub early enough so it can never be |
| 326 // moved by GC | 331 // moved by GC |
| 327 class DirectCEntryStub: public PlatformCodeStub { | 332 class DirectCEntryStub: public PlatformCodeStub { |
| 328 public: | 333 public: |
| 329 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 334 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 330 void GenerateCall(MacroAssembler* masm, Register target); | 335 void GenerateCall(MacroAssembler* masm, Register target); |
| 331 | 336 |
| 332 private: | 337 private: |
| 333 bool NeedsImmovableCode() { return true; } | 338 bool NeedsImmovableCode() { return true; } |
| 334 | 339 |
| 340 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 335 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); | 341 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); |
| 336 }; | 342 }; |
| 337 | 343 |
| 338 | 344 |
| 339 class NameDictionaryLookupStub: public PlatformCodeStub { | 345 class NameDictionaryLookupStub: public PlatformCodeStub { |
| 340 public: | 346 public: |
| 341 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 347 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
| 342 | 348 |
| 343 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) | 349 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) |
| 344 : PlatformCodeStub(isolate) { | 350 : PlatformCodeStub(isolate) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 372 NameDictionary::kCapacityIndex * kPointerSize; | 378 NameDictionary::kCapacityIndex * kPointerSize; |
| 373 | 379 |
| 374 static const int kElementsStartOffset = | 380 static const int kElementsStartOffset = |
| 375 NameDictionary::kHeaderSize + | 381 NameDictionary::kHeaderSize + |
| 376 NameDictionary::kElementsStartIndex * kPointerSize; | 382 NameDictionary::kElementsStartIndex * kPointerSize; |
| 377 | 383 |
| 378 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 384 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 379 | 385 |
| 380 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 386 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 381 | 387 |
| 388 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 382 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 389 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 383 }; | 390 }; |
| 384 | 391 |
| 385 | 392 |
| 386 } } // namespace v8::internal | 393 } } // namespace v8::internal |
| 387 | 394 |
| 388 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 395 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |