Mercurial > hg > truffle
annotate src/share/vm/utilities/macros.hpp @ 5749:12706c5b39bc
minor C1/C2 bugfix
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Tue, 03 Jul 2012 18:02:03 +0200 |
parents | 120820e30baa |
children | e522a00b91aa |
rev | line source |
---|---|
0 | 1 /* |
2321
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1490
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1490
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1490
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_UTILITIES_MACROS_HPP |
26 #define SHARE_VM_UTILITIES_MACROS_HPP | |
27 | |
0 | 28 // Use this to mark code that needs to be cleaned up (for development only) |
29 #define NEEDS_CLEANUP | |
30 | |
31 // Makes a string of the argument (which is not macro-expanded) | |
32 #define STR(a) #a | |
33 | |
34 // Makes a string of the macro expansion of a | |
35 #define XSTR(a) STR(a) | |
36 | |
37 // KERNEL variant | |
38 #ifdef KERNEL | |
39 #define COMPILER1 | |
40 #define SERIALGC | |
41 | |
42 #define JVMTI_KERNEL | |
43 #define FPROF_KERNEL | |
44 #define VM_STRUCTS_KERNEL | |
45 #define JNICHECK_KERNEL | |
46 #define SERVICES_KERNEL | |
47 | |
48 #define KERNEL_RETURN {} | |
2195
bf8517f4e4d0
6766644: Redefinition of compiled method fails with assertion "Can not load classes with the Compiler thread"
kamg
parents:
1972
diff
changeset
|
49 #define KERNEL_RETURN_(code) { return code; } |
0 | 50 |
51 #else // KERNEL | |
52 | |
53 #define KERNEL_RETURN /* next token must be ; */ | |
54 #define KERNEL_RETURN_(code) /* next token must be ; */ | |
55 | |
56 #endif // KERNEL | |
57 | |
58 // COMPILER1 variant | |
59 #ifdef COMPILER1 | |
60 #ifdef COMPILER2 | |
61 #define TIERED | |
62 #endif | |
63 #define COMPILER1_PRESENT(code) code | |
64 #else // COMPILER1 | |
65 #define COMPILER1_PRESENT(code) | |
66 #endif // COMPILER1 | |
67 | |
68 // COMPILER2 variant | |
69 #ifdef COMPILER2 | |
70 #define COMPILER2_PRESENT(code) code | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
71 #define NOT_COMPILER2(code) |
0 | 72 #else // COMPILER2 |
73 #define COMPILER2_PRESENT(code) | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
74 #define NOT_COMPILER2(code) code |
0 | 75 #endif // COMPILER2 |
76 | |
4559
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
77 #ifdef GRAAL |
5142
667c7bc2435b
Fix C++ code to allow successful build on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5130
diff
changeset
|
78 #define GRAAL_ONLY(code) code |
5114
dad1ac9dba7d
finished first implementation of disabling runtime feedback selectively based on deoptimization history
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4559
diff
changeset
|
79 #define NOT_GRAAL(code) |
4559
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
80 #else |
5142
667c7bc2435b
Fix C++ code to allow successful build on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5130
diff
changeset
|
81 #define GRAAL_ONLY(code) |
5114
dad1ac9dba7d
finished first implementation of disabling runtime feedback selectively based on deoptimization history
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4559
diff
changeset
|
82 #define NOT_GRAAL(code) code |
5747
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
83 #endif // GRAAL |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
84 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
85 #ifdef HIGH_LEVEL_INTERPRETER |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
86 #define HIGH_LEVEL_INTERPRETER_ONLY(code) code |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
87 #define NOT_HIGH_LEVEL_INTERPRETER(code) |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
88 #else |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
89 #define HIGH_LEVEL_INTERPRETER_ONLY(code) |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
90 #define NOT_HIGH_LEVEL_INTERPRETER(code) code |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5142
diff
changeset
|
91 #endif // HIGH_LEVEL_INTERPRETER |
4559
723df37192d6
Make it possible again to build a real client libjvm, drop the UseGraal flag.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
3960
diff
changeset
|
92 |
1783 | 93 #ifdef TIERED |
94 #define TIERED_ONLY(code) code | |
95 #define NOT_TIERED(code) | |
96 #else | |
97 #define TIERED_ONLY(code) | |
98 #define NOT_TIERED(code) code | |
99 #endif // TIERED | |
100 | |
0 | 101 |
102 // PRODUCT variant | |
103 #ifdef PRODUCT | |
104 #define PRODUCT_ONLY(code) code | |
105 #define NOT_PRODUCT(code) | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
106 #define NOT_PRODUCT_ARG(arg) |
0 | 107 #define PRODUCT_RETURN {} |
108 #define PRODUCT_RETURN0 { return 0; } | |
109 #define PRODUCT_RETURN_(code) { code } | |
110 #else // PRODUCT | |
111 #define PRODUCT_ONLY(code) | |
112 #define NOT_PRODUCT(code) code | |
1768
6ee479178066
6979444: add command line option to print command line flags descriptions
ikrylov
parents:
1692
diff
changeset
|
113 #define NOT_PRODUCT_ARG(arg) arg, |
0 | 114 #define PRODUCT_RETURN /*next token must be ;*/ |
115 #define PRODUCT_RETURN0 /*next token must be ;*/ | |
116 #define PRODUCT_RETURN_(code) /*next token must be ;*/ | |
117 #endif // PRODUCT | |
118 | |
119 #ifdef CHECK_UNHANDLED_OOPS | |
120 #define CHECK_UNHANDLED_OOPS_ONLY(code) code | |
121 #define NOT_CHECK_UNHANDLED_OOPS(code) | |
122 #else | |
123 #define CHECK_UNHANDLED_OOPS_ONLY(code) | |
124 #define NOT_CHECK_UNHANDLED_OOPS(code) code | |
125 #endif // CHECK_UNHANDLED_OOPS | |
126 | |
127 #ifdef CC_INTERP | |
128 #define CC_INTERP_ONLY(code) code | |
129 #define NOT_CC_INTERP(code) | |
130 #else | |
131 #define CC_INTERP_ONLY(code) | |
132 #define NOT_CC_INTERP(code) code | |
133 #endif // CC_INTERP | |
134 | |
135 #ifdef ASSERT | |
136 #define DEBUG_ONLY(code) code | |
137 #define NOT_DEBUG(code) | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
138 #define NOT_DEBUG_RETURN /*next token must be ;*/ |
0 | 139 // Historical. |
140 #define debug_only(code) code | |
141 #else // ASSERT | |
142 #define DEBUG_ONLY(code) | |
143 #define NOT_DEBUG(code) code | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
144 #define NOT_DEBUG_RETURN {} |
0 | 145 #define debug_only(code) |
146 #endif // ASSERT | |
147 | |
148 #ifdef _LP64 | |
149 #define LP64_ONLY(code) code | |
150 #define NOT_LP64(code) | |
151 #else // !_LP64 | |
152 #define LP64_ONLY(code) | |
153 #define NOT_LP64(code) code | |
154 #endif // _LP64 | |
155 | |
156 #ifdef LINUX | |
157 #define LINUX_ONLY(code) code | |
158 #define NOT_LINUX(code) | |
159 #else | |
160 #define LINUX_ONLY(code) | |
161 #define NOT_LINUX(code) code | |
162 #endif | |
163 | |
164 #ifdef SOLARIS | |
165 #define SOLARIS_ONLY(code) code | |
166 #define NOT_SOLARIS(code) | |
167 #else | |
168 #define SOLARIS_ONLY(code) | |
169 #define NOT_SOLARIS(code) code | |
170 #endif | |
171 | |
172 #ifdef _WINDOWS | |
173 #define WINDOWS_ONLY(code) code | |
174 #define NOT_WINDOWS(code) | |
175 #else | |
176 #define WINDOWS_ONLY(code) | |
177 #define NOT_WINDOWS(code) code | |
178 #endif | |
179 | |
3960 | 180 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) |
181 #define BSD_ONLY(code) code | |
182 #define NOT_BSD(code) | |
183 #else | |
184 #define BSD_ONLY(code) | |
185 #define NOT_BSD(code) code | |
186 #endif | |
187 | |
2321
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
188 #ifdef _WIN64 |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
189 #define WIN64_ONLY(code) code |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
190 #define NOT_WIN64(code) |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
191 #else |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
192 #define WIN64_ONLY(code) |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
193 #define NOT_WIN64(code) code |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
194 #endif |
1b4e6a5d98e0
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
twisti
parents:
2195
diff
changeset
|
195 |
304 | 196 #if defined(IA32) || defined(AMD64) |
197 #define X86 | |
198 #define X86_ONLY(code) code | |
1692 | 199 #define NOT_X86(code) |
304 | 200 #else |
201 #undef X86 | |
202 #define X86_ONLY(code) | |
1692 | 203 #define NOT_X86(code) code |
304 | 204 #endif |
205 | |
0 | 206 #ifdef IA32 |
207 #define IA32_ONLY(code) code | |
208 #define NOT_IA32(code) | |
209 #else | |
210 #define IA32_ONLY(code) | |
211 #define NOT_IA32(code) code | |
212 #endif | |
213 | |
214 #ifdef IA64 | |
215 #define IA64_ONLY(code) code | |
216 #define NOT_IA64(code) | |
217 #else | |
218 #define IA64_ONLY(code) | |
219 #define NOT_IA64(code) code | |
220 #endif | |
221 | |
222 #ifdef AMD64 | |
223 #define AMD64_ONLY(code) code | |
224 #define NOT_AMD64(code) | |
225 #else | |
226 #define AMD64_ONLY(code) | |
227 #define NOT_AMD64(code) code | |
228 #endif | |
229 | |
230 #ifdef SPARC | |
231 #define SPARC_ONLY(code) code | |
232 #define NOT_SPARC(code) | |
233 #else | |
234 #define SPARC_ONLY(code) | |
235 #define NOT_SPARC(code) code | |
236 #endif | |
237 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
238 #ifdef PPC |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
239 #define PPC_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
240 #define NOT_PPC(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
241 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
242 #define PPC_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
243 #define NOT_PPC(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
244 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
245 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
246 #ifdef E500V2 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
247 #define E500V2_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
248 #define NOT_E500V2(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
249 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
250 #define E500V2_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
251 #define NOT_E500V2(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
252 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
253 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
254 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
255 #ifdef ARM |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
256 #define ARM_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
257 #define NOT_ARM(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
258 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
259 #define ARM_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
260 #define NOT_ARM(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
261 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
262 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
263 #ifdef JAVASE_EMBEDDED |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
264 #define EMBEDDED_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
265 #define NOT_EMBEDDED(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
266 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
267 #define EMBEDDED_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
268 #define NOT_EMBEDDED(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
269 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
270 |
0 | 271 #define define_pd_global(type, name, value) const type pd_##name = value; |
1972 | 272 |
273 #endif // SHARE_VM_UTILITIES_MACROS_HPP |