OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_CODE_STUBS_ARM64_H_ | 5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ |
6 #define V8_ARM64_CODE_STUBS_ARM64_H_ | 6 #define V8_ARM64_CODE_STUBS_ARM64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 DCHECK(GetMode(stub) == mode); | 165 DCHECK(GetMode(stub) == mode); |
166 } | 166 } |
167 | 167 |
168 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 168 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
169 | 169 |
170 private: | 170 private: |
171 // This is a helper class to manage the registers associated with the stub. | 171 // This is a helper class to manage the registers associated with the stub. |
172 // The 'object' and 'address' registers must be preserved. | 172 // The 'object' and 'address' registers must be preserved. |
173 class RegisterAllocation { | 173 class RegisterAllocation { |
174 public: | 174 public: |
175 RegisterAllocation(Register object, | 175 RegisterAllocation(Register object, Register address, Register scratch) |
176 Register address, | |
177 Register scratch) | |
178 : object_(object), | 176 : object_(object), |
179 address_(address), | 177 address_(address), |
180 scratch0_(scratch), | 178 scratch0_(scratch), |
181 saved_regs_(kCallerSaved), | 179 saved_regs_(kCallerSaved), |
182 saved_fp_regs_(kCallerSavedFP) { | 180 saved_fp_regs_(kCallerSavedV) { |
183 DCHECK(!AreAliased(scratch, object, address)); | 181 DCHECK(!AreAliased(scratch, object, address)); |
184 | 182 |
185 // The SaveCallerSaveRegisters method needs to save caller-saved | 183 // The SaveCallerSaveRegisters method needs to save caller-saved |
186 // registers, but we don't bother saving MacroAssembler scratch registers. | 184 // registers, but we don't bother saving MacroAssembler scratch registers. |
187 saved_regs_.Remove(MacroAssembler::DefaultTmpList()); | 185 saved_regs_.Remove(MacroAssembler::DefaultTmpList()); |
188 saved_fp_regs_.Remove(MacroAssembler::DefaultFPTmpList()); | 186 saved_fp_regs_.Remove(MacroAssembler::DefaultFPTmpList()); |
189 | 187 |
190 // We would like to require more scratch registers for this stub, | 188 // We would like to require more scratch registers for this stub, |
191 // but the number of registers comes down to the ones used in | 189 // but the number of registers comes down to the ones used in |
192 // FullCodeGen::SetVar(), which is architecture independent. | 190 // FullCodeGen::SetVar(), which is architecture independent. |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 380 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
383 | 381 |
384 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 382 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
385 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 383 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
386 }; | 384 }; |
387 | 385 |
388 } // namespace internal | 386 } // namespace internal |
389 } // namespace v8 | 387 } // namespace v8 |
390 | 388 |
391 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ | 389 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ |
OLD | NEW |