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

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

Issue 371923006: Add mips64 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/base/atomicops_internals_mips64_gcc.h ('k') | src/base/cpu.cc » ('j') | 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 24 matching lines...) Expand all
35 #define V8_HOST_ARCH_IA32 1 35 #define V8_HOST_ARCH_IA32 1
36 #define V8_HOST_ARCH_32_BIT 1 36 #define V8_HOST_ARCH_32_BIT 1
37 #define V8_HOST_CAN_READ_UNALIGNED 1 37 #define V8_HOST_CAN_READ_UNALIGNED 1
38 #elif defined(__AARCH64EL__) 38 #elif defined(__AARCH64EL__)
39 #define V8_HOST_ARCH_ARM64 1 39 #define V8_HOST_ARCH_ARM64 1
40 #define V8_HOST_ARCH_64_BIT 1 40 #define V8_HOST_ARCH_64_BIT 1
41 #define V8_HOST_CAN_READ_UNALIGNED 1 41 #define V8_HOST_CAN_READ_UNALIGNED 1
42 #elif defined(__ARMEL__) 42 #elif defined(__ARMEL__)
43 #define V8_HOST_ARCH_ARM 1 43 #define V8_HOST_ARCH_ARM 1
44 #define V8_HOST_ARCH_32_BIT 1 44 #define V8_HOST_ARCH_32_BIT 1
45 #elif defined(__mips64)
46 #define V8_HOST_ARCH_MIPS64 1
47 #define V8_HOST_ARCH_64_BIT 1
45 #elif defined(__MIPSEB__) || defined(__MIPSEL__) 48 #elif defined(__MIPSEB__) || defined(__MIPSEL__)
46 #define V8_HOST_ARCH_MIPS 1 49 #define V8_HOST_ARCH_MIPS 1
47 #define V8_HOST_ARCH_32_BIT 1 50 #define V8_HOST_ARCH_32_BIT 1
48 #else 51 #else
49 #error "Host architecture was not detected as supported by v8" 52 #error "Host architecture was not detected as supported by v8"
50 #endif 53 #endif
51 54
52 #if defined(__ARM_ARCH_7A__) || \ 55 #if defined(__ARM_ARCH_7A__) || \
53 defined(__ARM_ARCH_7R__) || \ 56 defined(__ARM_ARCH_7R__) || \
54 defined(__ARM_ARCH_7__) 57 defined(__ARM_ARCH_7__)
55 # define CAN_USE_ARMV7_INSTRUCTIONS 1 58 # define CAN_USE_ARMV7_INSTRUCTIONS 1
56 # ifndef CAN_USE_VFP3_INSTRUCTIONS 59 # ifndef CAN_USE_VFP3_INSTRUCTIONS
57 # define CAN_USE_VFP3_INSTRUCTIONS 60 # define CAN_USE_VFP3_INSTRUCTIONS
58 # endif 61 # endif
59 #endif 62 #endif
60 63
61 64
62 // Target architecture detection. This may be set externally. If not, detect 65 // Target architecture detection. This may be set externally. If not, detect
63 // in the same way as the host architecture, that is, target the native 66 // in the same way as the host architecture, that is, target the native
64 // environment as presented by the compiler. 67 // environment as presented by the compiler.
65 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \ 68 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \
66 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS 69 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \
70 !V8_TARGET_ARCH_MIPS64
67 #if defined(_M_X64) || defined(__x86_64__) 71 #if defined(_M_X64) || defined(__x86_64__)
68 #define V8_TARGET_ARCH_X64 1 72 #define V8_TARGET_ARCH_X64 1
69 #elif defined(_M_IX86) || defined(__i386__) 73 #elif defined(_M_IX86) || defined(__i386__)
70 #define V8_TARGET_ARCH_IA32 1 74 #define V8_TARGET_ARCH_IA32 1
71 #elif defined(__AARCH64EL__) 75 #elif defined(__AARCH64EL__)
72 #define V8_TARGET_ARCH_ARM64 1 76 #define V8_TARGET_ARCH_ARM64 1
73 #elif defined(__ARMEL__) 77 #elif defined(__ARMEL__)
74 #define V8_TARGET_ARCH_ARM 1 78 #define V8_TARGET_ARCH_ARM 1
79 #elif defined(__mips64)
80 #define V8_TARGET_ARCH_MIPS64 1
75 #elif defined(__MIPSEB__) || defined(__MIPSEL__) 81 #elif defined(__MIPSEB__) || defined(__MIPSEL__)
76 #define V8_TARGET_ARCH_MIPS 1 82 #define V8_TARGET_ARCH_MIPS 1
77 #else 83 #else
78 #error Target architecture was not detected as supported by v8 84 #error Target architecture was not detected as supported by v8
79 #endif 85 #endif
80 #endif 86 #endif
81 87
82 // Determine architecture pointer size. 88 // Determine architecture pointer size.
83 #if V8_TARGET_ARCH_IA32 89 #if V8_TARGET_ARCH_IA32
84 #define V8_TARGET_ARCH_32_BIT 1 90 #define V8_TARGET_ARCH_32_BIT 1
85 #elif V8_TARGET_ARCH_X64 91 #elif V8_TARGET_ARCH_X64
86 #if !V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_64_BIT 92 #if !V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_64_BIT
87 #if defined(__x86_64__) && !defined(__LP64__) 93 #if defined(__x86_64__) && !defined(__LP64__)
88 #define V8_TARGET_ARCH_32_BIT 1 94 #define V8_TARGET_ARCH_32_BIT 1
89 #else 95 #else
90 #define V8_TARGET_ARCH_64_BIT 1 96 #define V8_TARGET_ARCH_64_BIT 1
91 #endif 97 #endif
92 #endif 98 #endif
93 #elif V8_TARGET_ARCH_ARM 99 #elif V8_TARGET_ARCH_ARM
94 #define V8_TARGET_ARCH_32_BIT 1 100 #define V8_TARGET_ARCH_32_BIT 1
95 #elif V8_TARGET_ARCH_ARM64 101 #elif V8_TARGET_ARCH_ARM64
96 #define V8_TARGET_ARCH_64_BIT 1 102 #define V8_TARGET_ARCH_64_BIT 1
97 #elif V8_TARGET_ARCH_MIPS 103 #elif V8_TARGET_ARCH_MIPS
98 #define V8_TARGET_ARCH_32_BIT 1 104 #define V8_TARGET_ARCH_32_BIT 1
105 #elif V8_TARGET_ARCH_MIPS64
106 #define V8_TARGET_ARCH_64_BIT 1
99 #elif V8_TARGET_ARCH_X87 107 #elif V8_TARGET_ARCH_X87
100 #define V8_TARGET_ARCH_32_BIT 1 108 #define V8_TARGET_ARCH_32_BIT 1
101 #else 109 #else
102 #error Unknown target architecture pointer size 110 #error Unknown target architecture pointer size
103 #endif 111 #endif
104 112
105 // Check for supported combinations of host and target architectures. 113 // Check for supported combinations of host and target architectures.
106 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32 114 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32
107 #error Target architecture ia32 is only supported on ia32 host 115 #error Target architecture ia32 is only supported on ia32 host
108 #endif 116 #endif
109 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT && \ 117 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT && \
110 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_64_BIT)) 118 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_64_BIT))
111 #error Target architecture x64 is only supported on x64 host 119 #error Target architecture x64 is only supported on x64 host
112 #endif 120 #endif
113 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT && \ 121 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT && \
114 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_32_BIT)) 122 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_32_BIT))
115 #error Target architecture x32 is only supported on x64 host with x32 support 123 #error Target architecture x32 is only supported on x64 host with x32 support
116 #endif 124 #endif
117 #if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM)) 125 #if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM))
118 #error Target architecture arm is only supported on arm and ia32 host 126 #error Target architecture arm is only supported on arm and ia32 host
119 #endif 127 #endif
120 #if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64)) 128 #if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64))
121 #error Target architecture arm64 is only supported on arm64 and x64 host 129 #error Target architecture arm64 is only supported on arm64 and x64 host
122 #endif 130 #endif
123 #if (V8_TARGET_ARCH_MIPS && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_MIPS)) 131 #if (V8_TARGET_ARCH_MIPS && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_MIPS))
124 #error Target architecture mips is only supported on mips and ia32 host 132 #error Target architecture mips is only supported on mips and ia32 host
125 #endif 133 #endif
134 #if (V8_TARGET_ARCH_MIPS64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_MIPS64))
135 #error Target architecture mips64 is only supported on mips64 and x64 host
136 #endif
126 137
127 // Determine architecture endianness. 138 // Determine architecture endianness.
128 #if V8_TARGET_ARCH_IA32 139 #if V8_TARGET_ARCH_IA32
129 #define V8_TARGET_LITTLE_ENDIAN 1 140 #define V8_TARGET_LITTLE_ENDIAN 1
130 #elif V8_TARGET_ARCH_X64 141 #elif V8_TARGET_ARCH_X64
131 #define V8_TARGET_LITTLE_ENDIAN 1 142 #define V8_TARGET_LITTLE_ENDIAN 1
132 #elif V8_TARGET_ARCH_ARM 143 #elif V8_TARGET_ARCH_ARM
133 #define V8_TARGET_LITTLE_ENDIAN 1 144 #define V8_TARGET_LITTLE_ENDIAN 1
134 #elif V8_TARGET_ARCH_ARM64 145 #elif V8_TARGET_ARCH_ARM64
135 #define V8_TARGET_LITTLE_ENDIAN 1 146 #define V8_TARGET_LITTLE_ENDIAN 1
136 #elif V8_TARGET_ARCH_MIPS 147 #elif V8_TARGET_ARCH_MIPS
137 #if defined(__MIPSEB__) 148 #if defined(__MIPSEB__)
138 #define V8_TARGET_BIG_ENDIAN 1 149 #define V8_TARGET_BIG_ENDIAN 1
139 #else 150 #else
140 #define V8_TARGET_LITTLE_ENDIAN 1 151 #define V8_TARGET_LITTLE_ENDIAN 1
141 #endif 152 #endif
153 #elif V8_TARGET_ARCH_MIPS64
154 #define V8_TARGET_LITTLE_ENDIAN 1
142 #elif V8_TARGET_ARCH_X87 155 #elif V8_TARGET_ARCH_X87
143 #define V8_TARGET_LITTLE_ENDIAN 1 156 #define V8_TARGET_LITTLE_ENDIAN 1
144 #else 157 #else
145 #error Unknown target architecture endianness 158 #error Unknown target architecture endianness
146 #endif 159 #endif
147 160
148 #if V8_OS_MACOSX || defined(__FreeBSD__) || defined(__OpenBSD__) 161 #if V8_OS_MACOSX || defined(__FreeBSD__) || defined(__OpenBSD__)
149 #define USING_BSD_ABI 162 #define USING_BSD_ABI
150 #endif 163 #endif
151 164
152 // Number of bits to represent the page size for paged spaces. The value of 20 165 // Number of bits to represent the page size for paged spaces. The value of 20
153 // gives 1Mb bytes per page. 166 // gives 1Mb bytes per page.
154 const int kPageSizeBits = 20; 167 const int kPageSizeBits = 20;
155 168
156 #endif // V8_BASE_BUILD_CONFIG_H_ 169 #endif // V8_BASE_BUILD_CONFIG_H_
OLDNEW
« no previous file with comments | « src/base/atomicops_internals_mips64_gcc.h ('k') | src/base/cpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698