OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" |
11 #include "src/frames.h" | 11 #include "src/frames.h" |
12 #include "src/globals.h" | 12 #include "src/globals.h" |
13 #include "src/x64/frames-x64.h" | 13 #include "src/x64/frames-x64.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 // Give alias names to registers for calling conventions. | 18 // Give alias names to registers for calling conventions. |
19 const Register kReturnRegister0 = {Register::kCode_rax}; | 19 const Register kReturnRegister0 = {Register::kCode_rax}; |
20 const Register kReturnRegister1 = {Register::kCode_rdx}; | 20 const Register kReturnRegister1 = {Register::kCode_rdx}; |
21 const Register kJSFunctionRegister = {Register::kCode_rdi}; | 21 const Register kJSFunctionRegister = {Register::kCode_rdi}; |
22 const Register kContextRegister = {Register::kCode_rsi}; | 22 const Register kContextRegister = {Register::kCode_rsi}; |
23 const Register kInterpreterAccumulatorRegister = {Register::kCode_rax}; | 23 const Register kInterpreterAccumulatorRegister = {Register::kCode_rax}; |
24 const Register kInterpreterRegisterFileRegister = {Register::kCode_r11}; | 24 const Register kInterpreterRegisterFileRegister = {Register::kCode_r11}; |
25 const Register kInterpreterBytecodeOffsetRegister = {Register::kCode_r12}; | 25 const Register kInterpreterBytecodeOffsetRegister = {Register::kCode_r12}; |
26 const Register kInterpreterBytecodeArrayRegister = {Register::kCode_r14}; | 26 const Register kInterpreterBytecodeArrayRegister = {Register::kCode_r14}; |
27 const Register kInterpreterDispatchTableRegister = {Register::kCode_r15}; | 27 const Register kInterpreterDispatchTableRegister = {Register::kCode_r15}; |
| 28 const Register kJavaScriptCallArgCountRegister = {Register::kCode_rax}; |
28 const Register kRuntimeCallFunctionRegister = {Register::kCode_rbx}; | 29 const Register kRuntimeCallFunctionRegister = {Register::kCode_rbx}; |
29 const Register kRuntimeCallArgCountRegister = {Register::kCode_rax}; | 30 const Register kRuntimeCallArgCountRegister = {Register::kCode_rax}; |
30 | 31 |
31 // Default scratch register used by MacroAssembler (and other code that needs | 32 // Default scratch register used by MacroAssembler (and other code that needs |
32 // a spare register). The register isn't callee save, and not used by the | 33 // a spare register). The register isn't callee save, and not used by the |
33 // function calling convention. | 34 // function calling convention. |
34 const Register kScratchRegister = { 10 }; // r10. | 35 const Register kScratchRegister = { 10 }; // r10. |
35 const Register kRootRegister = { 13 }; // r13 (callee save). | 36 const Register kRootRegister = { 13 }; // r13 (callee save). |
36 // Actual value of root register is offset from the root array's start | 37 // Actual value of root register is offset from the root array's start |
37 // to take advantage of negitive 8-bit displacement values. | 38 // to take advantage of negitive 8-bit displacement values. |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 } \ | 1717 } \ |
1717 masm-> | 1718 masm-> |
1718 #else | 1719 #else |
1719 #define ACCESS_MASM(masm) masm-> | 1720 #define ACCESS_MASM(masm) masm-> |
1720 #endif | 1721 #endif |
1721 | 1722 |
1722 } // namespace internal | 1723 } // namespace internal |
1723 } // namespace v8 | 1724 } // namespace v8 |
1724 | 1725 |
1725 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1726 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |