| 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_MACRO_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/arm64/assembler-arm64.h" | 10 #include "src/arm64/assembler-arm64.h" |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 int num_arguments, | 1125 int num_arguments, |
| 1126 int result_size); | 1126 int result_size); |
| 1127 void CallExternalReference(const ExternalReference& ext, | 1127 void CallExternalReference(const ExternalReference& ext, |
| 1128 int num_arguments); | 1128 int num_arguments); |
| 1129 | 1129 |
| 1130 | 1130 |
| 1131 // Invoke specified builtin JavaScript function. | 1131 // Invoke specified builtin JavaScript function. |
| 1132 void InvokeBuiltin(int native_context_index, InvokeFlag flag, | 1132 void InvokeBuiltin(int native_context_index, InvokeFlag flag, |
| 1133 const CallWrapper& call_wrapper = NullCallWrapper()); | 1133 const CallWrapper& call_wrapper = NullCallWrapper()); |
| 1134 | 1134 |
| 1135 // Store the code object for the given builtin in the target register and |
| 1136 // setup the function in the function register. |
| 1137 void GetBuiltinEntry(Register target, Register function, |
| 1138 int native_context_index); |
| 1139 |
| 1140 // Store the function for the given builtin in the target register. |
| 1141 void GetBuiltinFunction(Register target, int native_context_index); |
| 1142 |
| 1135 void Jump(Register target); | 1143 void Jump(Register target); |
| 1136 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); | 1144 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); |
| 1137 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); | 1145 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 1138 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); | 1146 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 1139 | 1147 |
| 1140 void Call(Register target); | 1148 void Call(Register target); |
| 1141 void Call(Label* target); | 1149 void Call(Label* target); |
| 1142 void Call(Address target, RelocInfo::Mode rmode); | 1150 void Call(Address target, RelocInfo::Mode rmode); |
| 1143 void Call(Handle<Code> code, | 1151 void Call(Handle<Code> code, |
| 1144 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 1152 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 // * The exit frame is dropped. | 1669 // * The exit frame is dropped. |
| 1662 // * The stack pointer is reset to jssp. | 1670 // * The stack pointer is reset to jssp. |
| 1663 // | 1671 // |
| 1664 // The stack pointer must be csp on entry. | 1672 // The stack pointer must be csp on entry. |
| 1665 void LeaveExitFrame(bool save_doubles, | 1673 void LeaveExitFrame(bool save_doubles, |
| 1666 const Register& scratch, | 1674 const Register& scratch, |
| 1667 bool restore_context); | 1675 bool restore_context); |
| 1668 | 1676 |
| 1669 void LoadContext(Register dst, int context_chain_length); | 1677 void LoadContext(Register dst, int context_chain_length); |
| 1670 | 1678 |
| 1671 // Load the global object from the current context. | |
| 1672 void LoadGlobalObject(Register dst) { | |
| 1673 LoadNativeContextSlot(Context::EXTENSION_INDEX, dst); | |
| 1674 } | |
| 1675 | |
| 1676 // Load the global proxy from the current context. | 1679 // Load the global proxy from the current context. |
| 1677 void LoadGlobalProxy(Register dst) { | 1680 void LoadGlobalProxy(Register dst); |
| 1678 LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst); | |
| 1679 } | |
| 1680 | 1681 |
| 1681 // Emit code for a truncating division by a constant. The dividend register is | 1682 // Emit code for a truncating division by a constant. The dividend register is |
| 1682 // unchanged. Dividend and result must be different. | 1683 // unchanged. Dividend and result must be different. |
| 1683 void TruncatingDiv(Register result, Register dividend, int32_t divisor); | 1684 void TruncatingDiv(Register result, Register dividend, int32_t divisor); |
| 1684 | 1685 |
| 1685 // --------------------------------------------------------------------------- | 1686 // --------------------------------------------------------------------------- |
| 1686 // StatsCounter support | 1687 // StatsCounter support |
| 1687 | 1688 |
| 1688 void SetCounter(StatsCounter* counter, int value, Register scratch1, | 1689 void SetCounter(StatsCounter* counter, int value, Register scratch1, |
| 1689 Register scratch2); | 1690 Register scratch2); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1891 // map_in_out is the cached Array map in the native context of | 1892 // map_in_out is the cached Array map in the native context of |
| 1892 // expected_kind. | 1893 // expected_kind. |
| 1893 void LoadTransitionedArrayMapConditional( | 1894 void LoadTransitionedArrayMapConditional( |
| 1894 ElementsKind expected_kind, | 1895 ElementsKind expected_kind, |
| 1895 ElementsKind transitioned_kind, | 1896 ElementsKind transitioned_kind, |
| 1896 Register map_in_out, | 1897 Register map_in_out, |
| 1897 Register scratch1, | 1898 Register scratch1, |
| 1898 Register scratch2, | 1899 Register scratch2, |
| 1899 Label* no_map_match); | 1900 Label* no_map_match); |
| 1900 | 1901 |
| 1901 void LoadNativeContextSlot(int index, Register dst); | 1902 void LoadGlobalFunction(int index, Register function); |
| 1902 | 1903 |
| 1903 // Load the initial map from the global function. The registers function and | 1904 // Load the initial map from the global function. The registers function and |
| 1904 // map can be the same, function is then overwritten. | 1905 // map can be the same, function is then overwritten. |
| 1905 void LoadGlobalFunctionInitialMap(Register function, | 1906 void LoadGlobalFunctionInitialMap(Register function, |
| 1906 Register map, | 1907 Register map, |
| 1907 Register scratch); | 1908 Register scratch); |
| 1908 | 1909 |
| 1909 CPURegList* TmpList() { return &tmp_list_; } | 1910 CPURegList* TmpList() { return &tmp_list_; } |
| 1910 CPURegList* FPTmpList() { return &fptmp_list_; } | 1911 CPURegList* FPTmpList() { return &fptmp_list_; } |
| 1911 | 1912 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 // The state of the available lists at the start of this scope. | 2197 // The state of the available lists at the start of this scope. |
| 2197 RegList old_available_; // kRegister | 2198 RegList old_available_; // kRegister |
| 2198 RegList old_availablefp_; // kFPRegister | 2199 RegList old_availablefp_; // kFPRegister |
| 2199 }; | 2200 }; |
| 2200 | 2201 |
| 2201 | 2202 |
| 2202 inline MemOperand ContextMemOperand(Register context, int index = 0) { | 2203 inline MemOperand ContextMemOperand(Register context, int index = 0) { |
| 2203 return MemOperand(context, Context::SlotOffset(index)); | 2204 return MemOperand(context, Context::SlotOffset(index)); |
| 2204 } | 2205 } |
| 2205 | 2206 |
| 2206 inline MemOperand NativeContextMemOperand() { | 2207 inline MemOperand GlobalObjectMemOperand() { |
| 2207 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 2208 return ContextMemOperand(cp, Context::GLOBAL_OBJECT_INDEX); |
| 2208 } | 2209 } |
| 2209 | 2210 |
| 2210 | 2211 |
| 2211 // Encode and decode information about patchable inline SMI checks. | 2212 // Encode and decode information about patchable inline SMI checks. |
| 2212 class InlineSmiCheckInfo { | 2213 class InlineSmiCheckInfo { |
| 2213 public: | 2214 public: |
| 2214 explicit InlineSmiCheckInfo(Address info); | 2215 explicit InlineSmiCheckInfo(Address info); |
| 2215 | 2216 |
| 2216 bool HasSmiCheck() const { | 2217 bool HasSmiCheck() const { |
| 2217 return smi_check_ != NULL; | 2218 return smi_check_ != NULL; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2263 #error "Unsupported option" | 2264 #error "Unsupported option" |
| 2264 #define CODE_COVERAGE_STRINGIFY(x) #x | 2265 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2265 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2266 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2266 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2267 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2267 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2268 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2268 #else | 2269 #else |
| 2269 #define ACCESS_MASM(masm) masm-> | 2270 #define ACCESS_MASM(masm) masm-> |
| 2270 #endif | 2271 #endif |
| 2271 | 2272 |
| 2272 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2273 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| OLD | NEW |