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
InitializePlatformSpecific(AccessCompilerData * data)28 void PropertyAccessCompiler::InitializePlatformSpecific(
29 AccessCompilerData* data) {
30 Register receiver = LoadDescriptor::ReceiverRegister();
31 Register name = LoadDescriptor::NameRegister();
32
33 // Load calling convention.
34 // receiver, name, scratch1, scratch2, scratch3.
35 Register load_registers[] = {receiver, name, x3, x0, x4};
36
37 // Store calling convention.
38 // receiver, name, scratch1, scratch2.
39 Register store_registers[] = {receiver, name, x3, x4};
40
41 data->Initialize(arraysize(load_registers), load_registers,
42 arraysize(store_registers), store_registers);
43 }
44
45 #undef __
46 } // namespace internal
47 } // namespace v8
48
49 #endif // V8_TARGET_ARCH_ARM64
50