Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: src/base/build_config.h

Issue 1585813002: S390: Makefile + Build Toolchain Updates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add S390 target defines to BUILD.gn Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/toolchain.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_BASE_BUILD_CONFIG_H_ 5 #ifndef V8_BASE_BUILD_CONFIG_H_
6 #define V8_BASE_BUILD_CONFIG_H_ 6 #define V8_BASE_BUILD_CONFIG_H_
7 7
8 #include "include/v8config.h" 8 #include "include/v8config.h"
9 9
10 // Processor architecture detection. For more info on what's defined, see: 10 // Processor architecture detection. For more info on what's defined, see:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #elif defined(__MIPSEB__) || defined(__MIPSEL__) 48 #elif defined(__MIPSEB__) || defined(__MIPSEL__)
49 #define V8_HOST_ARCH_MIPS 1 49 #define V8_HOST_ARCH_MIPS 1
50 #define V8_HOST_ARCH_32_BIT 1 50 #define V8_HOST_ARCH_32_BIT 1
51 #elif defined(__PPC__) || defined(_ARCH_PPC) 51 #elif defined(__PPC__) || defined(_ARCH_PPC)
52 #define V8_HOST_ARCH_PPC 1 52 #define V8_HOST_ARCH_PPC 1
53 #if defined(__PPC64__) || defined(_ARCH_PPC64) 53 #if defined(__PPC64__) || defined(_ARCH_PPC64)
54 #define V8_HOST_ARCH_64_BIT 1 54 #define V8_HOST_ARCH_64_BIT 1
55 #else 55 #else
56 #define V8_HOST_ARCH_32_BIT 1 56 #define V8_HOST_ARCH_32_BIT 1
57 #endif 57 #endif
58 #elif defined(__s390__) || defined(__s390x__)
59 #define V8_HOST_ARCH_S390 1
60 #if defined(__s390x__)
61 #define V8_HOST_ARCH_64_BIT 1
62 #else
63 #define V8_HOST_ARCH_32_BIT 1
64 #endif
58 #else 65 #else
59 #error "Host architecture was not detected as supported by v8" 66 #error "Host architecture was not detected as supported by v8"
60 #endif 67 #endif
61 68
62 #if defined(__ARM_ARCH_7A__) || \ 69 #if defined(__ARM_ARCH_7A__) || \
63 defined(__ARM_ARCH_7R__) || \ 70 defined(__ARM_ARCH_7R__) || \
64 defined(__ARM_ARCH_7__) 71 defined(__ARM_ARCH_7__)
65 # define CAN_USE_ARMV7_INSTRUCTIONS 1 72 # define CAN_USE_ARMV7_INSTRUCTIONS 1
66 # ifndef CAN_USE_VFP3_INSTRUCTIONS 73 # ifndef CAN_USE_VFP3_INSTRUCTIONS
67 # define CAN_USE_VFP3_INSTRUCTIONS 74 # define CAN_USE_VFP3_INSTRUCTIONS
68 # endif 75 # endif
69 #endif 76 #endif
70 77
71 #if defined(__ARM_ARCH_8A__) 78 #if defined(__ARM_ARCH_8A__)
72 # define CAN_USE_ARMV8_INSTRUCTIONS 1 79 # define CAN_USE_ARMV8_INSTRUCTIONS 1
73 #endif 80 #endif
74 81
75 82
76 // Target architecture detection. This may be set externally. If not, detect 83 // Target architecture detection. This may be set externally. If not, detect
77 // in the same way as the host architecture, that is, target the native 84 // in the same way as the host architecture, that is, target the native
78 // environment as presented by the compiler. 85 // environment as presented by the compiler.
79 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \ 86 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \
80 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \ 87 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \
81 !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC 88 !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390
82 #if defined(_M_X64) || defined(__x86_64__) 89 #if defined(_M_X64) || defined(__x86_64__)
83 #define V8_TARGET_ARCH_X64 1 90 #define V8_TARGET_ARCH_X64 1
84 #elif defined(_M_IX86) || defined(__i386__) 91 #elif defined(_M_IX86) || defined(__i386__)
85 #define V8_TARGET_ARCH_IA32 1 92 #define V8_TARGET_ARCH_IA32 1
86 #elif defined(__AARCH64EL__) 93 #elif defined(__AARCH64EL__)
87 #define V8_TARGET_ARCH_ARM64 1 94 #define V8_TARGET_ARCH_ARM64 1
88 #elif defined(__ARMEL__) 95 #elif defined(__ARMEL__)
89 #define V8_TARGET_ARCH_ARM 1 96 #define V8_TARGET_ARCH_ARM 1
90 #elif defined(__mips64) 97 #elif defined(__mips64)
91 #define V8_TARGET_ARCH_MIPS64 1 98 #define V8_TARGET_ARCH_MIPS64 1
(...skipping 22 matching lines...) Expand all
114 #elif V8_TARGET_ARCH_MIPS 121 #elif V8_TARGET_ARCH_MIPS
115 #define V8_TARGET_ARCH_32_BIT 1 122 #define V8_TARGET_ARCH_32_BIT 1
116 #elif V8_TARGET_ARCH_MIPS64 123 #elif V8_TARGET_ARCH_MIPS64
117 #define V8_TARGET_ARCH_64_BIT 1 124 #define V8_TARGET_ARCH_64_BIT 1
118 #elif V8_TARGET_ARCH_PPC 125 #elif V8_TARGET_ARCH_PPC
119 #if V8_TARGET_ARCH_PPC64 126 #if V8_TARGET_ARCH_PPC64
120 #define V8_TARGET_ARCH_64_BIT 1 127 #define V8_TARGET_ARCH_64_BIT 1
121 #else 128 #else
122 #define V8_TARGET_ARCH_32_BIT 1 129 #define V8_TARGET_ARCH_32_BIT 1
123 #endif 130 #endif
131 #elif V8_TARGET_ARCH_S390
132 #if V8_TARGET_ARCH_S390X
133 #define V8_TARGET_ARCH_64_BIT 1
134 #else
135 #define V8_TARGET_ARCH_32_BIT 1
136 #endif
124 #elif V8_TARGET_ARCH_X87 137 #elif V8_TARGET_ARCH_X87
125 #define V8_TARGET_ARCH_32_BIT 1 138 #define V8_TARGET_ARCH_32_BIT 1
126 #else 139 #else
127 #error Unknown target architecture pointer size 140 #error Unknown target architecture pointer size
128 #endif 141 #endif
129 142
130 // Check for supported combinations of host and target architectures. 143 // Check for supported combinations of host and target architectures.
131 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32 144 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32
132 #error Target architecture ia32 is only supported on ia32 host 145 #error Target architecture ia32 is only supported on ia32 host
133 #endif 146 #endif
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #define V8_TARGET_BIG_ENDIAN 1 185 #define V8_TARGET_BIG_ENDIAN 1
173 #else 186 #else
174 #define V8_TARGET_LITTLE_ENDIAN 1 187 #define V8_TARGET_LITTLE_ENDIAN 1
175 #endif 188 #endif
176 #elif V8_TARGET_ARCH_X87 189 #elif V8_TARGET_ARCH_X87
177 #define V8_TARGET_LITTLE_ENDIAN 1 190 #define V8_TARGET_LITTLE_ENDIAN 1
178 #elif V8_TARGET_ARCH_PPC_LE 191 #elif V8_TARGET_ARCH_PPC_LE
179 #define V8_TARGET_LITTLE_ENDIAN 1 192 #define V8_TARGET_LITTLE_ENDIAN 1
180 #elif V8_TARGET_ARCH_PPC_BE 193 #elif V8_TARGET_ARCH_PPC_BE
181 #define V8_TARGET_BIG_ENDIAN 1 194 #define V8_TARGET_BIG_ENDIAN 1
195 #elif V8_TARGET_ARCH_S390
196 #if V8_TARGET_ARCH_S390_LE_SIM
197 #define V8_TARGET_LITTLE_ENDIAN 1
198 #else
199 #define V8_TARGET_BIG_ENDIAN 1
200 #endif
182 #else 201 #else
183 #error Unknown target architecture endianness 202 #error Unknown target architecture endianness
184 #endif 203 #endif
185 204
186 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) || \ 205 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) || \
187 defined(V8_TARGET_ARCH_X87) 206 defined(V8_TARGET_ARCH_X87)
188 #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 1 207 #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 1
189 #else 208 #else
190 #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 209 #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0
191 #endif 210 #endif
192 211
193 // Number of bits to represent the page size for paged spaces. The value of 20 212 // Number of bits to represent the page size for paged spaces. The value of 20
194 // gives 1Mb bytes per page. 213 // gives 1Mb bytes per page.
195 #if V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC && V8_OS_LINUX 214 #if V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC && V8_OS_LINUX
196 // Bump up for Power Linux due to larger (64K) page size. 215 // Bump up for Power Linux due to larger (64K) page size.
197 const int kPageSizeBits = 22; 216 const int kPageSizeBits = 22;
198 #else 217 #else
199 const int kPageSizeBits = 20; 218 const int kPageSizeBits = 20;
200 #endif 219 #endif
201 220
202 #endif // V8_BASE_BUILD_CONFIG_H_ 221 #endif // V8_BASE_BUILD_CONFIG_H_
OLDNEW
« no previous file with comments | « build/toolchain.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698