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/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 // function). | 1123 // function). |
1124 void CallCFunction(ExternalReference function, | 1124 void CallCFunction(ExternalReference function, |
1125 int num_reg_arguments); | 1125 int num_reg_arguments); |
1126 void CallCFunction(ExternalReference function, | 1126 void CallCFunction(ExternalReference function, |
1127 int num_reg_arguments, | 1127 int num_reg_arguments, |
1128 int num_double_arguments); | 1128 int num_double_arguments); |
1129 void CallCFunction(Register function, | 1129 void CallCFunction(Register function, |
1130 int num_reg_arguments, | 1130 int num_reg_arguments, |
1131 int num_double_arguments); | 1131 int num_double_arguments); |
1132 | 1132 |
1133 // Calls an API function. Allocates HandleScope, extracts returned value | |
1134 // from handle and propagates exceptions. | |
1135 // 'stack_space' is the space to be unwound on exit (includes the call JS | |
1136 // arguments space and the additional space allocated for the fast call). | |
1137 // 'spill_offset' is the offset from the stack pointer where | |
1138 // CallApiFunctionAndReturn can spill registers. | |
1139 void CallApiFunctionAndReturn(Register function_address, | |
1140 ExternalReference thunk_ref, int stack_space, | |
1141 MemOperand* stack_space_operand, | |
1142 int spill_offset, | |
1143 MemOperand return_value_operand, | |
1144 MemOperand* context_restore_operand); | |
1145 | |
1146 // The number of register that CallApiFunctionAndReturn will need to save on | |
1147 // the stack. The space for these registers need to be allocated in the | |
1148 // ExitFrame before calling CallApiFunctionAndReturn. | |
1149 static const int kCallApiFunctionSpillSpace = 4; | |
1150 | |
1151 // Jump to a runtime routine. | 1133 // Jump to a runtime routine. |
1152 void JumpToExternalReference(const ExternalReference& builtin); | 1134 void JumpToExternalReference(const ExternalReference& builtin); |
1153 // Tail call of a runtime routine (jump). | 1135 // Tail call of a runtime routine (jump). |
1154 // Like JumpToExternalReference, but also takes care of passing the number | 1136 // Like JumpToExternalReference, but also takes care of passing the number |
1155 // of parameters. | 1137 // of parameters. |
1156 void TailCallExternalReference(const ExternalReference& ext, | 1138 void TailCallExternalReference(const ExternalReference& ext, |
1157 int num_arguments, | 1139 int num_arguments, |
1158 int result_size); | 1140 int result_size); |
1159 void CallExternalReference(const ExternalReference& ext, | 1141 void CallExternalReference(const ExternalReference& ext, |
1160 int num_arguments); | 1142 int num_arguments); |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 #error "Unsupported option" | 2313 #error "Unsupported option" |
2332 #define CODE_COVERAGE_STRINGIFY(x) #x | 2314 #define CODE_COVERAGE_STRINGIFY(x) #x |
2333 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2315 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2334 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2316 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2335 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2317 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2336 #else | 2318 #else |
2337 #define ACCESS_MASM(masm) masm-> | 2319 #define ACCESS_MASM(masm) masm-> |
2338 #endif | 2320 #endif |
2339 | 2321 |
2340 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2322 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |