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_MACRO_ASSEMBLER_H_ | 5 #ifndef V8_MACRO_ASSEMBLER_H_ |
6 #define V8_MACRO_ASSEMBLER_H_ | 6 #define V8_MACRO_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 | 9 |
10 | 10 |
11 // Helper types to make boolean flag easier to read at call-site. | 11 // Helper types to make boolean flag easier to read at call-site. |
12 enum InvokeFlag { | 12 enum InvokeFlag { |
13 CALL_FUNCTION, | 13 CALL_FUNCTION, |
14 JUMP_FUNCTION | 14 JUMP_FUNCTION |
15 }; | 15 }; |
16 | 16 |
17 | 17 |
18 // Flags used for the AllocateInNewSpace functions. | 18 // Flags used for the AllocateInNewSpace functions. |
19 enum AllocationFlags { | 19 enum AllocationFlags { |
20 // No special flags. | 20 // No special flags. |
21 NO_ALLOCATION_FLAGS = 0, | 21 NO_ALLOCATION_FLAGS = 0, |
22 // Return the pointer to the allocated already tagged as a heap object. | |
23 TAG_OBJECT = 1 << 0, | |
24 // The content of the result register already contains the allocation top in | 22 // The content of the result register already contains the allocation top in |
25 // new space. | 23 // new space. |
26 RESULT_CONTAINS_TOP = 1 << 1, | 24 RESULT_CONTAINS_TOP = 1 << 0, |
27 // Specify that the requested size of the space to allocate is specified in | 25 // Specify that the requested size of the space to allocate is specified in |
28 // words instead of bytes. | 26 // words instead of bytes. |
29 SIZE_IN_WORDS = 1 << 2, | 27 SIZE_IN_WORDS = 1 << 1, |
30 // Align the allocation to a multiple of kDoubleSize | 28 // Align the allocation to a multiple of kDoubleSize |
31 DOUBLE_ALIGNMENT = 1 << 3, | 29 DOUBLE_ALIGNMENT = 1 << 2, |
32 // Directly allocate in old space | 30 // Directly allocate in old space |
33 PRETENURE = 1 << 4, | 31 PRETENURE = 1 << 3, |
34 }; | 32 }; |
35 | 33 |
36 | |
37 #if V8_TARGET_ARCH_IA32 | 34 #if V8_TARGET_ARCH_IA32 |
38 #include "src/ia32/assembler-ia32.h" | 35 #include "src/ia32/assembler-ia32.h" |
39 #include "src/ia32/assembler-ia32-inl.h" | 36 #include "src/ia32/assembler-ia32-inl.h" |
40 #include "src/ia32/macro-assembler-ia32.h" | 37 #include "src/ia32/macro-assembler-ia32.h" |
41 #elif V8_TARGET_ARCH_X64 | 38 #elif V8_TARGET_ARCH_X64 |
42 #include "src/x64/assembler-x64.h" | 39 #include "src/x64/assembler-x64.h" |
43 #include "src/x64/assembler-x64-inl.h" | 40 #include "src/x64/assembler-x64-inl.h" |
44 #include "src/x64/macro-assembler-x64.h" | 41 #include "src/x64/macro-assembler-x64.h" |
45 #elif V8_TARGET_ARCH_ARM64 | 42 #elif V8_TARGET_ARCH_ARM64 |
46 #include "src/arm64/assembler-arm64.h" | 43 #include "src/arm64/assembler-arm64.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 } | 277 } |
281 return ExternalReference::new_space_allocation_limit_address(isolate); | 278 return ExternalReference::new_space_allocation_limit_address(isolate); |
282 } | 279 } |
283 }; | 280 }; |
284 | 281 |
285 | 282 |
286 } // namespace internal | 283 } // namespace internal |
287 } // namespace v8 | 284 } // namespace v8 |
288 | 285 |
289 #endif // V8_MACRO_ASSEMBLER_H_ | 286 #endif // V8_MACRO_ASSEMBLER_H_ |
OLD | NEW |