Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 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 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 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 | |
| 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 | |
| 28 | Register* PropertyAccessCompiler::load_calling_convention() { |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 29 | // receiver, name, scratch1, scratch2, scratch3. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 30 | Register receiver = LoadDescriptor::ReceiverRegister(); |
| 31 | Register name = LoadDescriptor::NameRegister(); |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 32 | static Register registers[] = {receiver, name, x3, x0, x4}; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 33 | return registers; |
| 34 | } |
| 35 | |
| 36 | |
| 37 | Register* PropertyAccessCompiler::store_calling_convention() { |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 38 | // receiver, value, scratch1, scratch2. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 39 | Register receiver = StoreDescriptor::ReceiverRegister(); |
| 40 | Register name = StoreDescriptor::NameRegister(); |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 41 | static Register registers[] = {receiver, name, x3, x4}; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 42 | return registers; |
| 43 | } |
| 44 | |
| 45 | |
| 46 | #undef __ |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 47 | } // namespace internal |
| 48 | } // namespace v8 |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 49 | |
| 50 | #endif // V8_TARGET_ARCH_ARM64 |