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 16 matching lines...) Expand all Loading... |
27 #else | 27 #else |
28 #define ASM_UNIMPLEMENTED(message) | 28 #define ASM_UNIMPLEMENTED(message) |
29 #define ASM_UNIMPLEMENTED_BREAK(message) | 29 #define ASM_UNIMPLEMENTED_BREAK(message) |
30 #define ASM_LOCATION(message) | 30 #define ASM_LOCATION(message) |
31 #endif | 31 #endif |
32 | 32 |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
| 37 // Give alias names to registers for calling conventions. |
| 38 // TODO(titzer): arm64 is a pain for aliasing; get rid of these macros |
| 39 #define kReturnRegister0 x0 |
| 40 #define kReturnRegister1 x1 |
| 41 #define kJSFunctionRegister x1 |
| 42 #define kContextRegister cp |
| 43 #define kInterpreterBytecodeOffsetRegister x19 |
| 44 #define kInterpreterBytecodeArrayRegister x20 |
| 45 #define kInterpreterDispatchTableRegister x21 |
| 46 #define kRuntimeCallFunctionRegister x1 |
| 47 #define kRuntimeCallArgCountRegister x0 |
| 48 |
37 #define LS_MACRO_LIST(V) \ | 49 #define LS_MACRO_LIST(V) \ |
38 V(Ldrb, Register&, rt, LDRB_w) \ | 50 V(Ldrb, Register&, rt, LDRB_w) \ |
39 V(Strb, Register&, rt, STRB_w) \ | 51 V(Strb, Register&, rt, STRB_w) \ |
40 V(Ldrsb, Register&, rt, rt.Is64Bits() ? LDRSB_x : LDRSB_w) \ | 52 V(Ldrsb, Register&, rt, rt.Is64Bits() ? LDRSB_x : LDRSB_w) \ |
41 V(Ldrh, Register&, rt, LDRH_w) \ | 53 V(Ldrh, Register&, rt, LDRH_w) \ |
42 V(Strh, Register&, rt, STRH_w) \ | 54 V(Strh, Register&, rt, STRH_w) \ |
43 V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \ | 55 V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \ |
44 V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \ | 56 V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \ |
45 V(Str, CPURegister&, rt, StoreOpFor(rt)) \ | 57 V(Str, CPURegister&, rt, StoreOpFor(rt)) \ |
46 V(Ldrsw, Register&, rt, LDRSW_x) | 58 V(Ldrsw, Register&, rt, LDRSW_x) |
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2296 #error "Unsupported option" | 2308 #error "Unsupported option" |
2297 #define CODE_COVERAGE_STRINGIFY(x) #x | 2309 #define CODE_COVERAGE_STRINGIFY(x) #x |
2298 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2310 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2299 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2311 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2300 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2312 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2301 #else | 2313 #else |
2302 #define ACCESS_MASM(masm) masm-> | 2314 #define ACCESS_MASM(masm) masm-> |
2303 #endif | 2315 #endif |
2304 | 2316 |
2305 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2317 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |