| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 explicit RestoreRegistersStateStub(Isolate* isolate) | 66 explicit RestoreRegistersStateStub(Isolate* isolate) |
| 67 : PlatformCodeStub(isolate) {} | 67 : PlatformCodeStub(isolate) {} |
| 68 | 68 |
| 69 static void GenerateAheadOfTime(Isolate* isolate); | 69 static void GenerateAheadOfTime(Isolate* isolate); |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 72 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 73 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); | 73 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // This stub can convert a signed int32 to a heap number (double). It does | |
| 77 // not work for int32s that are in Smi range! No GC occurs during this stub | |
| 78 // so you don't have to set up the frame. | |
| 79 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { | |
| 80 public: | |
| 81 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, | |
| 82 Register the_heap_number, Register scratch, | |
| 83 Register scratch2) | |
| 84 : PlatformCodeStub(isolate) { | |
| 85 minor_key_ = IntRegisterBits::encode(the_int.code()) | | |
| 86 HeapNumberRegisterBits::encode(the_heap_number.code()) | | |
| 87 ScratchRegisterBits::encode(scratch.code()) | | |
| 88 SignRegisterBits::encode(scratch2.code()); | |
| 89 DCHECK(IntRegisterBits::is_valid(the_int.code())); | |
| 90 DCHECK(HeapNumberRegisterBits::is_valid(the_heap_number.code())); | |
| 91 DCHECK(ScratchRegisterBits::is_valid(scratch.code())); | |
| 92 DCHECK(SignRegisterBits::is_valid(scratch2.code())); | |
| 93 } | |
| 94 | |
| 95 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | |
| 96 | |
| 97 private: | |
| 98 void Generate(MacroAssembler* masm); | |
| 99 | |
| 100 Register the_int() const { | |
| 101 return Register::from_code(IntRegisterBits::decode(minor_key_)); | |
| 102 } | |
| 103 | |
| 104 Register the_heap_number() const { | |
| 105 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); | |
| 106 } | |
| 107 | |
| 108 Register scratch() const { | |
| 109 return Register::from_code(ScratchRegisterBits::decode(minor_key_)); | |
| 110 } | |
| 111 | |
| 112 Register sign() const { | |
| 113 return Register::from_code(SignRegisterBits::decode(minor_key_)); | |
| 114 } | |
| 115 | |
| 116 // Minor key encoding in 16 bits. | |
| 117 class IntRegisterBits: public BitField<int, 0, 4> {}; | |
| 118 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; | |
| 119 class ScratchRegisterBits: public BitField<int, 8, 4> {}; | |
| 120 class SignRegisterBits: public BitField<int, 12, 4> {}; | |
| 121 | |
| 122 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | |
| 123 DEFINE_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); | |
| 124 }; | |
| 125 | |
| 126 | 76 |
| 127 class RecordWriteStub: public PlatformCodeStub { | 77 class RecordWriteStub: public PlatformCodeStub { |
| 128 public: | 78 public: |
| 129 RecordWriteStub(Isolate* isolate, | 79 RecordWriteStub(Isolate* isolate, |
| 130 Register object, | 80 Register object, |
| 131 Register value, | 81 Register value, |
| 132 Register address, | 82 Register address, |
| 133 RememberedSetAction remembered_set_action, | 83 RememberedSetAction remembered_set_action, |
| 134 SaveFPRegsMode fp_mode) | 84 SaveFPRegsMode fp_mode) |
| 135 : PlatformCodeStub(isolate), | 85 : PlatformCodeStub(isolate), |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 338 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 389 | 339 |
| 390 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 340 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 391 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 341 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 392 }; | 342 }; |
| 393 | 343 |
| 394 | 344 |
| 395 } } // namespace v8::internal | 345 } } // namespace v8::internal |
| 396 | 346 |
| 397 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 347 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |