1 // Copyright 2014 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "src/v8.h" 6 7 #if V8_TARGET_ARCH_ARM64 8 9 #include "src/ic/access-compiler.h" 10 11 namespace v8 { 12 namespace internal { 13 14 #define __ ACCESS_MASM(masm) 15 16 17 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, 18 Handle<Code> code) { 19 __ Jump(code, RelocInfo::CODE_TARGET); 20 } 21 22 23 // TODO(all): The so-called scratch registers are significant in some cases. For 24 // example, PropertyAccessCompiler::keyed_store_calling_convention()[3] (x3) is 25 // actually 26 // used for KeyedStoreCompiler::transition_map(). We should verify which 27 // registers are actually scratch registers, and which are important. For now, 28 // we use the same assignments as ARM to remain on the safe side. 29 30 Register* PropertyAccessCompiler::load_calling_convention() { 31 // receiver, name, scratch1, scratch2, scratch3, scratch4. 32 Register receiver = LoadDescriptor::ReceiverRegister(); 33 Register name = LoadDescriptor::NameRegister(); 34 static Register registers[] = {receiver, name, x3, x0, x4, x5}; 35 return registers; 36 } 37 38 39 Register* PropertyAccessCompiler::store_calling_convention() { 40 // receiver, value, scratch1, scratch2, scratch3. 41 Register receiver = StoreDescriptor::ReceiverRegister(); 42 Register name = StoreDescriptor::NameRegister(); 43 DCHECK(x3.is(ElementTransitionAndStoreDescriptor::MapRegister())); 44 static Register registers[] = {receiver, name, x3, x4, x5}; 45 return registers; 46 } 47 48 49 #undef __ 50 } 51 } // namespace v8::internal 52 53 #endif // V8_TARGET_ARCH_ARM64 54