OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM_CODE_STUBS_ARM_H_ | 5 #ifndef V8_ARM_CODE_STUBS_ARM_H_ |
6 #define V8_ARM_CODE_STUBS_ARM_H_ | 6 #define V8_ARM_CODE_STUBS_ARM_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 private: | 40 private: |
41 static void GenerateOneByteCharsCompareLoop( | 41 static void GenerateOneByteCharsCompareLoop( |
42 MacroAssembler* masm, Register left, Register right, Register length, | 42 MacroAssembler* masm, Register left, Register right, Register length, |
43 Register scratch1, Register scratch2, Label* chars_not_equal); | 43 Register scratch1, Register scratch2, Label* chars_not_equal); |
44 | 44 |
45 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 45 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
46 }; | 46 }; |
47 | 47 |
48 | 48 |
49 // This stub can convert a signed int32 to a heap number (double). It does | |
50 // not work for int32s that are in Smi range! No GC occurs during this stub | |
51 // so you don't have to set up the frame. | |
52 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { | |
53 public: | |
54 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, | |
55 Register the_heap_number, Register scratch) | |
56 : PlatformCodeStub(isolate) { | |
57 minor_key_ = IntRegisterBits::encode(the_int.code()) | | |
58 HeapNumberRegisterBits::encode(the_heap_number.code()) | | |
59 ScratchRegisterBits::encode(scratch.code()); | |
60 } | |
61 | |
62 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | |
63 | |
64 private: | |
65 Register the_int() const { | |
66 return Register::from_code(IntRegisterBits::decode(minor_key_)); | |
67 } | |
68 | |
69 Register the_heap_number() const { | |
70 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); | |
71 } | |
72 | |
73 Register scratch() const { | |
74 return Register::from_code(ScratchRegisterBits::decode(minor_key_)); | |
75 } | |
76 | |
77 // Minor key encoding in 16 bits. | |
78 class IntRegisterBits: public BitField<int, 0, 4> {}; | |
79 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; | |
80 class ScratchRegisterBits: public BitField<int, 8, 4> {}; | |
81 | |
82 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | |
83 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); | |
84 }; | |
85 | |
86 | |
87 class RecordWriteStub: public PlatformCodeStub { | 49 class RecordWriteStub: public PlatformCodeStub { |
88 public: | 50 public: |
89 RecordWriteStub(Isolate* isolate, | 51 RecordWriteStub(Isolate* isolate, |
90 Register object, | 52 Register object, |
91 Register value, | 53 Register value, |
92 Register address, | 54 Register address, |
93 RememberedSetAction remembered_set_action, | 55 RememberedSetAction remembered_set_action, |
94 SaveFPRegsMode fp_mode) | 56 SaveFPRegsMode fp_mode) |
95 : PlatformCodeStub(isolate), | 57 : PlatformCodeStub(isolate), |
96 regs_(object, // An input reg. | 58 regs_(object, // An input reg. |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 305 |
344 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 306 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
345 | 307 |
346 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 308 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
347 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 309 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
348 }; | 310 }; |
349 | 311 |
350 } } // namespace v8::internal | 312 } } // namespace v8::internal |
351 | 313 |
352 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 314 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
OLD | NEW |