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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 int num_arguments, | 1094 int num_arguments, |
1095 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { | 1095 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { |
1096 CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); | 1096 CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); |
1097 } | 1097 } |
1098 | 1098 |
1099 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { | 1099 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { |
1100 const Runtime::Function* function = Runtime::FunctionForId(id); | 1100 const Runtime::Function* function = Runtime::FunctionForId(id); |
1101 CallRuntime(function, function->nargs, kSaveFPRegs); | 1101 CallRuntime(function, function->nargs, kSaveFPRegs); |
1102 } | 1102 } |
1103 | 1103 |
1104 void TailCallRuntime(Runtime::FunctionId fid, | 1104 void TailCallRuntime(Runtime::FunctionId fid, int num_arguments); |
1105 int num_arguments, | |
1106 int result_size); | |
1107 | 1105 |
1108 int ActivationFrameAlignment(); | 1106 int ActivationFrameAlignment(); |
1109 | 1107 |
1110 // Calls a C function. | 1108 // Calls a C function. |
1111 // The called function is not allowed to trigger a | 1109 // The called function is not allowed to trigger a |
1112 // garbage collection, since that might move the code and invalidate the | 1110 // garbage collection, since that might move the code and invalidate the |
1113 // return address (unless this is somehow accounted for by the called | 1111 // return address (unless this is somehow accounted for by the called |
1114 // function). | 1112 // function). |
1115 void CallCFunction(ExternalReference function, | 1113 void CallCFunction(ExternalReference function, |
1116 int num_reg_arguments); | 1114 int num_reg_arguments); |
1117 void CallCFunction(ExternalReference function, | 1115 void CallCFunction(ExternalReference function, |
1118 int num_reg_arguments, | 1116 int num_reg_arguments, |
1119 int num_double_arguments); | 1117 int num_double_arguments); |
1120 void CallCFunction(Register function, | 1118 void CallCFunction(Register function, |
1121 int num_reg_arguments, | 1119 int num_reg_arguments, |
1122 int num_double_arguments); | 1120 int num_double_arguments); |
1123 | 1121 |
1124 // Jump to a runtime routine. | 1122 // Jump to a runtime routine. |
1125 void JumpToExternalReference(const ExternalReference& builtin); | 1123 void JumpToExternalReference(const ExternalReference& builtin); |
1126 // Tail call of a runtime routine (jump). | 1124 // Tail call of a runtime routine (jump). |
1127 // Like JumpToExternalReference, but also takes care of passing the number | 1125 // Like JumpToExternalReference, but also takes care of passing the number |
1128 // of parameters. | 1126 // of parameters. |
1129 void TailCallExternalReference(const ExternalReference& ext, | 1127 void TailCallExternalReference(const ExternalReference& ext, |
1130 int num_arguments, | 1128 int num_arguments); |
1131 int result_size); | |
1132 void CallExternalReference(const ExternalReference& ext, | 1129 void CallExternalReference(const ExternalReference& ext, |
1133 int num_arguments); | 1130 int num_arguments); |
1134 | 1131 |
1135 | 1132 |
1136 // Invoke specified builtin JavaScript function. | 1133 // Invoke specified builtin JavaScript function. |
1137 void InvokeBuiltin(int native_context_index, InvokeFlag flag, | 1134 void InvokeBuiltin(int native_context_index, InvokeFlag flag, |
1138 const CallWrapper& call_wrapper = NullCallWrapper()); | 1135 const CallWrapper& call_wrapper = NullCallWrapper()); |
1139 | 1136 |
1140 void Jump(Register target); | 1137 void Jump(Register target); |
1141 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); | 1138 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); |
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 #error "Unsupported option" | 2238 #error "Unsupported option" |
2242 #define CODE_COVERAGE_STRINGIFY(x) #x | 2239 #define CODE_COVERAGE_STRINGIFY(x) #x |
2243 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2240 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2244 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2241 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2245 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2242 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2246 #else | 2243 #else |
2247 #define ACCESS_MASM(masm) masm-> | 2244 #define ACCESS_MASM(masm) masm-> |
2248 #endif | 2245 #endif |
2249 | 2246 |
2250 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2247 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |