| 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 : PlatformCodeStub(isolate) {} | 66 : PlatformCodeStub(isolate) {} |
| 67 | 67 |
| 68 static void GenerateAheadOfTime(Isolate* isolate); | 68 static void GenerateAheadOfTime(Isolate* isolate); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 71 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 72 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); | 72 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); |
| 73 }; | 73 }; |
| 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 Register the_int() const { | |
| 99 return Register::from_code(IntRegisterBits::decode(minor_key_)); | |
| 100 } | |
| 101 | |
| 102 Register the_heap_number() const { | |
| 103 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); | |
| 104 } | |
| 105 | |
| 106 Register scratch() const { | |
| 107 return Register::from_code(ScratchRegisterBits::decode(minor_key_)); | |
| 108 } | |
| 109 | |
| 110 Register sign() const { | |
| 111 return Register::from_code(SignRegisterBits::decode(minor_key_)); | |
| 112 } | |
| 113 | |
| 114 // Minor key encoding in 16 bits. | |
| 115 class IntRegisterBits: public BitField<int, 0, 4> {}; | |
| 116 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; | |
| 117 class ScratchRegisterBits: public BitField<int, 8, 4> {}; | |
| 118 class SignRegisterBits: public BitField<int, 12, 4> {}; | |
| 119 | |
| 120 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | |
| 121 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); | |
| 122 }; | |
| 123 | |
| 124 | |
| 125 class RecordWriteStub: public PlatformCodeStub { | 76 class RecordWriteStub: public PlatformCodeStub { |
| 126 public: | 77 public: |
| 127 RecordWriteStub(Isolate* isolate, | 78 RecordWriteStub(Isolate* isolate, |
| 128 Register object, | 79 Register object, |
| 129 Register value, | 80 Register value, |
| 130 Register address, | 81 Register address, |
| 131 RememberedSetAction remembered_set_action, | 82 RememberedSetAction remembered_set_action, |
| 132 SaveFPRegsMode fp_mode) | 83 SaveFPRegsMode fp_mode) |
| 133 : PlatformCodeStub(isolate), | 84 : PlatformCodeStub(isolate), |
| 134 regs_(object, // An input reg. | 85 regs_(object, // An input reg. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 337 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 387 | 338 |
| 388 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 339 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 389 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 340 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 390 }; | 341 }; |
| 391 | 342 |
| 392 | 343 |
| 393 } } // namespace v8::internal | 344 } } // namespace v8::internal |
| 394 | 345 |
| 395 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 346 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |