OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/assembler.h" | 5 #include "src/assembler.h" |
6 #include "src/macro-assembler.h" | 6 #include "src/macro-assembler.h" |
7 | 7 |
8 #include "src/wasm/wasm-module.h" | 8 #include "src/wasm/wasm-module.h" |
9 | 9 |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 LinkageLocation stackloc(int i) { | 52 LinkageLocation stackloc(int i) { |
53 return LinkageLocation::ForCallerFrameSlot(i); | 53 return LinkageLocation::ForCallerFrameSlot(i); |
54 } | 54 } |
55 | 55 |
56 | 56 |
57 #if V8_TARGET_ARCH_IA32 | 57 #if V8_TARGET_ARCH_IA32 |
58 // =========================================================================== | 58 // =========================================================================== |
59 // == ia32 =================================================================== | 59 // == ia32 =================================================================== |
60 // =========================================================================== | 60 // =========================================================================== |
61 #define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi, edi | 61 #define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi |
62 #define GP_RETURN_REGISTERS eax, edx | 62 #define GP_RETURN_REGISTERS eax, edx |
63 #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 | 63 #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 |
64 #define FP_RETURN_REGISTERS xmm1, xmm2 | 64 #define FP_RETURN_REGISTERS xmm1, xmm2 |
65 | 65 |
66 #elif V8_TARGET_ARCH_X64 | 66 #elif V8_TARGET_ARCH_X64 |
67 // =========================================================================== | 67 // =========================================================================== |
68 // == x64 ==================================================================== | 68 // == x64 ==================================================================== |
69 // =========================================================================== | 69 // =========================================================================== |
70 #define GP_PARAM_REGISTERS rax, rdx, rcx, rbx, rsi, rdi | 70 #define GP_PARAM_REGISTERS rax, rdx, rcx, rbx, rsi, rdi |
71 #define GP_RETURN_REGISTERS rax, rdx | 71 #define GP_RETURN_REGISTERS rax, rdx |
72 #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 | 72 #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 |
73 #define FP_RETURN_REGISTERS xmm1, xmm2 | 73 #define FP_RETURN_REGISTERS xmm1, xmm2 |
74 | 74 |
75 #elif V8_TARGET_ARCH_X87 | 75 #elif V8_TARGET_ARCH_X87 |
76 // =========================================================================== | 76 // =========================================================================== |
77 // == x87 ==================================================================== | 77 // == x87 ==================================================================== |
78 // =========================================================================== | 78 // =========================================================================== |
79 #define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi, edi | 79 #define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi |
80 #define GP_RETURN_REGISTERS eax, edx | 80 #define GP_RETURN_REGISTERS eax, edx |
81 #define FP_RETURN_REGISTERS stX_0 | 81 #define FP_RETURN_REGISTERS stX_0 |
82 | 82 |
83 #elif V8_TARGET_ARCH_ARM | 83 #elif V8_TARGET_ARCH_ARM |
84 // =========================================================================== | 84 // =========================================================================== |
85 // == arm ==================================================================== | 85 // == arm ==================================================================== |
86 // =========================================================================== | 86 // =========================================================================== |
87 #define GP_PARAM_REGISTERS r0, r1, r2, r3 | 87 #define GP_PARAM_REGISTERS r0, r1, r2, r3 |
88 #define GP_RETURN_REGISTERS r0, r1 | 88 #define GP_RETURN_REGISTERS r0, r1 |
89 #define FP_PARAM_REGISTERS d0, d1, d2, d3, d4, d5, d6, d7 | 89 #define FP_PARAM_REGISTERS d0, d1, d2, d3, d4, d5, d6, d7 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 params.stack_offset, // stack_parameter_count | 273 params.stack_offset, // stack_parameter_count |
274 compiler::Operator::kNoProperties, // properties | 274 compiler::Operator::kNoProperties, // properties |
275 kCalleeSaveRegisters, // callee-saved registers | 275 kCalleeSaveRegisters, // callee-saved registers |
276 kCalleeSaveFPRegisters, // callee-saved fp regs | 276 kCalleeSaveFPRegisters, // callee-saved fp regs |
277 CallDescriptor::kUseNativeStack, // flags | 277 CallDescriptor::kUseNativeStack, // flags |
278 "c-call"); | 278 "c-call"); |
279 } | 279 } |
280 } // namespace wasm | 280 } // namespace wasm |
281 } // namespace internal | 281 } // namespace internal |
282 } // namespace v8 | 282 } // namespace v8 |
OLD | NEW |