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 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
| 17 // Give alias names to registers for calling conventions. |
| 18 const Register kReturnRegister0 = {kRegister_rax_Code}; |
| 19 const Register kReturnRegister1 = {kRegister_rdx_Code}; |
| 20 const Register kJSFunctionRegister = {kRegister_rdi_Code}; |
| 21 const Register kContextRegister = {kRegister_rsi_Code}; |
| 22 const Register kInterpreterBytecodeOffsetRegister = {kRegister_r12_Code}; |
| 23 const Register kInterpreterBytecodeArrayRegister = {kRegister_r14_Code}; |
| 24 const Register kInterpreterDispatchTableRegister = {kRegister_r15_Code}; |
| 25 const Register kRuntimeCallFunctionRegister = {kRegister_rbx_Code}; |
| 26 const Register kRuntimeCallArgCountRegister = {kRegister_rax_Code}; |
| 27 |
17 // Default scratch register used by MacroAssembler (and other code that needs | 28 // Default scratch register used by MacroAssembler (and other code that needs |
18 // a spare register). The register isn't callee save, and not used by the | 29 // a spare register). The register isn't callee save, and not used by the |
19 // function calling convention. | 30 // function calling convention. |
20 const Register kScratchRegister = { 10 }; // r10. | 31 const Register kScratchRegister = { 10 }; // r10. |
21 const Register kRootRegister = { 13 }; // r13 (callee save). | 32 const Register kRootRegister = { 13 }; // r13 (callee save). |
22 // Actual value of root register is offset from the root array's start | 33 // Actual value of root register is offset from the root array's start |
23 // to take advantage of negitive 8-bit displacement values. | 34 // to take advantage of negitive 8-bit displacement values. |
24 const int kRootRegisterBias = 128; | 35 const int kRootRegisterBias = 128; |
25 | 36 |
26 // Convenience for platform-independent signatures. | 37 // Convenience for platform-independent signatures. |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 masm->popfq(); \ | 1621 masm->popfq(); \ |
1611 } \ | 1622 } \ |
1612 masm-> | 1623 masm-> |
1613 #else | 1624 #else |
1614 #define ACCESS_MASM(masm) masm-> | 1625 #define ACCESS_MASM(masm) masm-> |
1615 #endif | 1626 #endif |
1616 | 1627 |
1617 } } // namespace v8::internal | 1628 } } // namespace v8::internal |
1618 | 1629 |
1619 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1630 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |