Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: src/arm64/macro-assembler-arm64.h

Issue 1480003002: [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add patch from Orion for interpreter cementation test. Disable obsolete/invalid tests. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1143 void Jump(Register target); 1135 void Jump(Register target);
1144 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); 1136 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al);
1145 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); 1137 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al);
1146 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 1138 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
1147 1139
1148 void Call(Register target); 1140 void Call(Register target);
1149 void Call(Label* target); 1141 void Call(Label* target);
1150 void Call(Address target, RelocInfo::Mode rmode); 1142 void Call(Address target, RelocInfo::Mode rmode);
1151 void Call(Handle<Code> code, 1143 void Call(Handle<Code> code,
1152 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, 1144 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 // * The exit frame is dropped. 1661 // * The exit frame is dropped.
1670 // * The stack pointer is reset to jssp. 1662 // * The stack pointer is reset to jssp.
1671 // 1663 //
1672 // The stack pointer must be csp on entry. 1664 // The stack pointer must be csp on entry.
1673 void LeaveExitFrame(bool save_doubles, 1665 void LeaveExitFrame(bool save_doubles,
1674 const Register& scratch, 1666 const Register& scratch,
1675 bool restore_context); 1667 bool restore_context);
1676 1668
1677 void LoadContext(Register dst, int context_chain_length); 1669 void LoadContext(Register dst, int context_chain_length);
1678 1670
1671 // Load the global object from the current context.
1672 void LoadGlobalObject(Register dst) {
1673 LoadNativeContextSlot(Context::EXTENSION_INDEX, dst);
1674 }
1675
1679 // Load the global proxy from the current context. 1676 // Load the global proxy from the current context.
1680 void LoadGlobalProxy(Register dst); 1677 void LoadGlobalProxy(Register dst) {
1678 LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst);
1679 }
1681 1680
1682 // Emit code for a truncating division by a constant. The dividend register is 1681 // Emit code for a truncating division by a constant. The dividend register is
1683 // unchanged. Dividend and result must be different. 1682 // unchanged. Dividend and result must be different.
1684 void TruncatingDiv(Register result, Register dividend, int32_t divisor); 1683 void TruncatingDiv(Register result, Register dividend, int32_t divisor);
1685 1684
1686 // --------------------------------------------------------------------------- 1685 // ---------------------------------------------------------------------------
1687 // StatsCounter support 1686 // StatsCounter support
1688 1687
1689 void SetCounter(StatsCounter* counter, int value, Register scratch1, 1688 void SetCounter(StatsCounter* counter, int value, Register scratch1,
1690 Register scratch2); 1689 Register scratch2);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 // map_in_out is the cached Array map in the native context of 1891 // map_in_out is the cached Array map in the native context of
1893 // expected_kind. 1892 // expected_kind.
1894 void LoadTransitionedArrayMapConditional( 1893 void LoadTransitionedArrayMapConditional(
1895 ElementsKind expected_kind, 1894 ElementsKind expected_kind,
1896 ElementsKind transitioned_kind, 1895 ElementsKind transitioned_kind,
1897 Register map_in_out, 1896 Register map_in_out,
1898 Register scratch1, 1897 Register scratch1,
1899 Register scratch2, 1898 Register scratch2,
1900 Label* no_map_match); 1899 Label* no_map_match);
1901 1900
1902 void LoadGlobalFunction(int index, Register function); 1901 void LoadNativeContextSlot(int index, Register dst);
1903 1902
1904 // Load the initial map from the global function. The registers function and 1903 // Load the initial map from the global function. The registers function and
1905 // map can be the same, function is then overwritten. 1904 // map can be the same, function is then overwritten.
1906 void LoadGlobalFunctionInitialMap(Register function, 1905 void LoadGlobalFunctionInitialMap(Register function,
1907 Register map, 1906 Register map,
1908 Register scratch); 1907 Register scratch);
1909 1908
1910 CPURegList* TmpList() { return &tmp_list_; } 1909 CPURegList* TmpList() { return &tmp_list_; }
1911 CPURegList* FPTmpList() { return &fptmp_list_; } 1910 CPURegList* FPTmpList() { return &fptmp_list_; }
1912 1911
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 // The state of the available lists at the start of this scope. 2196 // The state of the available lists at the start of this scope.
2198 RegList old_available_; // kRegister 2197 RegList old_available_; // kRegister
2199 RegList old_availablefp_; // kFPRegister 2198 RegList old_availablefp_; // kFPRegister
2200 }; 2199 };
2201 2200
2202 2201
2203 inline MemOperand ContextMemOperand(Register context, int index = 0) { 2202 inline MemOperand ContextMemOperand(Register context, int index = 0) {
2204 return MemOperand(context, Context::SlotOffset(index)); 2203 return MemOperand(context, Context::SlotOffset(index));
2205 } 2204 }
2206 2205
2207 inline MemOperand GlobalObjectMemOperand() { 2206 inline MemOperand NativeContextMemOperand() {
2208 return ContextMemOperand(cp, Context::GLOBAL_OBJECT_INDEX); 2207 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX);
2209 } 2208 }
2210 2209
2211 2210
2212 // Encode and decode information about patchable inline SMI checks. 2211 // Encode and decode information about patchable inline SMI checks.
2213 class InlineSmiCheckInfo { 2212 class InlineSmiCheckInfo {
2214 public: 2213 public:
2215 explicit InlineSmiCheckInfo(Address info); 2214 explicit InlineSmiCheckInfo(Address info);
2216 2215
2217 bool HasSmiCheck() const { 2216 bool HasSmiCheck() const {
2218 return smi_check_ != NULL; 2217 return smi_check_ != NULL;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 #error "Unsupported option" 2263 #error "Unsupported option"
2265 #define CODE_COVERAGE_STRINGIFY(x) #x 2264 #define CODE_COVERAGE_STRINGIFY(x) #x
2266 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2265 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2267 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2266 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2268 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2267 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2269 #else 2268 #else
2270 #define ACCESS_MASM(masm) masm-> 2269 #define ACCESS_MASM(masm) masm->
2271 #endif 2270 #endif
2272 2271
2273 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 2272 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698