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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 # include <limits> // NOLINT | 21 # include <limits> // NOLINT |
22 # define V8_INFINITY std::numeric_limits<double>::infinity() | 22 # define V8_INFINITY std::numeric_limits<double>::infinity() |
23 #elif V8_LIBC_MSVCRT | 23 #elif V8_LIBC_MSVCRT |
24 # define V8_INFINITY HUGE_VAL | 24 # define V8_INFINITY HUGE_VAL |
25 #else | 25 #else |
26 # define V8_INFINITY INFINITY | 26 # define V8_INFINITY INFINITY |
27 #endif | 27 #endif |
28 | 28 |
29 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ | 29 #if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \ |
30 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 30 V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
31 V8_TARGET_ARCH_MIPS64 | 31 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC |
32 #define V8_TURBOFAN_BACKEND 1 | 32 #define V8_TURBOFAN_BACKEND 1 |
33 #else | 33 #else |
34 #define V8_TURBOFAN_BACKEND 0 | 34 #define V8_TURBOFAN_BACKEND 0 |
35 #endif | 35 #endif |
36 #if V8_TURBOFAN_BACKEND | 36 #if V8_TURBOFAN_BACKEND |
37 #define V8_TURBOFAN_TARGET 1 | 37 #define V8_TURBOFAN_TARGET 1 |
38 #else | 38 #else |
39 #define V8_TURBOFAN_TARGET 0 | 39 #define V8_TURBOFAN_TARGET 0 |
40 #endif | 40 #endif |
41 | 41 |
(...skipping 10 matching lines...) Expand all Loading... |
52 // Determine whether we are running in a simulated environment. | 52 // Determine whether we are running in a simulated environment. |
53 // Setting USE_SIMULATOR explicitly from the build script will force | 53 // Setting USE_SIMULATOR explicitly from the build script will force |
54 // the use of a simulated environment. | 54 // the use of a simulated environment. |
55 #if !defined(USE_SIMULATOR) | 55 #if !defined(USE_SIMULATOR) |
56 #if (V8_TARGET_ARCH_ARM64 && !V8_HOST_ARCH_ARM64) | 56 #if (V8_TARGET_ARCH_ARM64 && !V8_HOST_ARCH_ARM64) |
57 #define USE_SIMULATOR 1 | 57 #define USE_SIMULATOR 1 |
58 #endif | 58 #endif |
59 #if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM) | 59 #if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM) |
60 #define USE_SIMULATOR 1 | 60 #define USE_SIMULATOR 1 |
61 #endif | 61 #endif |
| 62 #if (V8_TARGET_ARCH_PPC && !V8_HOST_ARCH_PPC) |
| 63 #define USE_SIMULATOR 1 |
| 64 #endif |
62 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) | 65 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) |
63 #define USE_SIMULATOR 1 | 66 #define USE_SIMULATOR 1 |
64 #endif | 67 #endif |
65 #if (V8_TARGET_ARCH_MIPS64 && !V8_HOST_ARCH_MIPS64) | 68 #if (V8_TARGET_ARCH_MIPS64 && !V8_HOST_ARCH_MIPS64) |
66 #define USE_SIMULATOR 1 | 69 #define USE_SIMULATOR 1 |
67 #endif | 70 #endif |
68 #endif | 71 #endif |
69 | 72 |
70 // Determine whether the architecture uses an out-of-line constant pool. | 73 // Determine whether the architecture uses an out-of-line constant pool. |
71 #define V8_OOL_CONSTANT_POOL 0 | 74 #define V8_OOL_CONSTANT_POOL 0 |
72 | 75 |
73 #ifdef V8_TARGET_ARCH_ARM | 76 #ifdef V8_TARGET_ARCH_ARM |
74 // Set stack limit lower for ARM than for other architectures because | 77 // Set stack limit lower for ARM than for other architectures because |
75 // stack allocating MacroAssembler takes 120K bytes. | 78 // stack allocating MacroAssembler takes 120K bytes. |
76 // See issue crbug.com/405338 | 79 // See issue crbug.com/405338 |
77 #define V8_DEFAULT_STACK_SIZE_KB 864 | 80 #define V8_DEFAULT_STACK_SIZE_KB 864 |
78 #else | 81 #else |
79 // Slightly less than 1MB, since Windows' default stack size for | 82 // Slightly less than 1MB, since Windows' default stack size for |
80 // the main execution thread is 1MB for both 32 and 64-bit. | 83 // the main execution thread is 1MB for both 32 and 64-bit. |
81 #define V8_DEFAULT_STACK_SIZE_KB 984 | 84 #define V8_DEFAULT_STACK_SIZE_KB 984 |
82 #endif | 85 #endif |
83 | 86 |
84 | 87 |
85 // Determine whether double field unboxing feature is enabled. | 88 // Determine whether double field unboxing feature is enabled. |
86 #if (V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64) | 89 #if V8_TARGET_ARCH_64_BIT |
87 #define V8_DOUBLE_FIELDS_UNBOXING 1 | 90 #define V8_DOUBLE_FIELDS_UNBOXING 1 |
88 #else | 91 #else |
89 #define V8_DOUBLE_FIELDS_UNBOXING 0 | 92 #define V8_DOUBLE_FIELDS_UNBOXING 0 |
90 #endif | 93 #endif |
91 | 94 |
92 | 95 |
93 typedef uint8_t byte; | 96 typedef uint8_t byte; |
94 typedef byte* Address; | 97 typedef byte* Address; |
95 | 98 |
96 // ----------------------------------------------------------------------------- | 99 // ----------------------------------------------------------------------------- |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 NEON, | 621 NEON, |
619 // MIPS, MIPS64 | 622 // MIPS, MIPS64 |
620 FPU, | 623 FPU, |
621 FP64FPU, | 624 FP64FPU, |
622 MIPSr1, | 625 MIPSr1, |
623 MIPSr2, | 626 MIPSr2, |
624 MIPSr6, | 627 MIPSr6, |
625 // ARM64 | 628 // ARM64 |
626 ALWAYS_ALIGN_CSP, | 629 ALWAYS_ALIGN_CSP, |
627 COHERENT_CACHE, | 630 COHERENT_CACHE, |
| 631 // PPC |
| 632 FPR_GPR_MOV, |
| 633 LWSYNC, |
| 634 ISELECT, |
628 NUMBER_OF_CPU_FEATURES | 635 NUMBER_OF_CPU_FEATURES |
629 }; | 636 }; |
630 | 637 |
631 | 638 |
632 // Used to specify if a macro instruction must perform a smi check on tagged | 639 // Used to specify if a macro instruction must perform a smi check on tagged |
633 // values. | 640 // values. |
634 enum SmiCheckType { | 641 enum SmiCheckType { |
635 DONT_DO_SMI_CHECK, | 642 DONT_DO_SMI_CHECK, |
636 DO_SMI_CHECK | 643 DO_SMI_CHECK |
637 }; | 644 }; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 DCHECK(IsValidFunctionKind(kind)); | 817 DCHECK(IsValidFunctionKind(kind)); |
811 return kind & FunctionKind::kDefaultConstructor; | 818 return kind & FunctionKind::kDefaultConstructor; |
812 } | 819 } |
813 | 820 |
814 | 821 |
815 } } // namespace v8::internal | 822 } } // namespace v8::internal |
816 | 823 |
817 namespace i = v8::internal; | 824 namespace i = v8::internal; |
818 | 825 |
819 #endif // V8_GLOBALS_H_ | 826 #endif // V8_GLOBALS_H_ |
OLD | NEW |