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