Mercurial > hg > graal-compiler
annotate src/share/vm/utilities/macros.hpp @ 1722:effb55808a18
Merge
author | johnc |
---|---|
date | Wed, 18 Aug 2010 17:44:33 -0400 |
parents | d2ede61b7a12 |
children | 6ee479178066 d5d065957597 |
rev | line source |
---|---|
0 | 1 /* |
1692 | 2 * Copyright (c) 1997, 2010, 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 | |
25 // Use this to mark code that needs to be cleaned up (for development only) | |
26 #define NEEDS_CLEANUP | |
27 | |
28 // Makes a string of the argument (which is not macro-expanded) | |
29 #define STR(a) #a | |
30 | |
31 // Makes a string of the macro expansion of a | |
32 #define XSTR(a) STR(a) | |
33 | |
34 // KERNEL variant | |
35 #ifdef KERNEL | |
36 #define COMPILER1 | |
37 #define SERIALGC | |
38 | |
39 #define JVMTI_KERNEL | |
40 #define FPROF_KERNEL | |
41 #define VM_STRUCTS_KERNEL | |
42 #define JNICHECK_KERNEL | |
43 #define SERVICES_KERNEL | |
44 | |
45 #define KERNEL_RETURN {} | |
46 #define KERNEL_RETURN_(code) { code } | |
47 | |
48 #else // KERNEL | |
49 | |
50 #define KERNEL_RETURN /* next token must be ; */ | |
51 #define KERNEL_RETURN_(code) /* next token must be ; */ | |
52 | |
53 #endif // KERNEL | |
54 | |
55 // COMPILER1 variant | |
56 #ifdef COMPILER1 | |
57 #ifdef COMPILER2 | |
58 #define TIERED | |
59 #endif | |
60 #define COMPILER1_PRESENT(code) code | |
61 #else // COMPILER1 | |
62 #define COMPILER1_PRESENT(code) | |
63 #endif // COMPILER1 | |
64 | |
65 // COMPILER2 variant | |
66 #ifdef COMPILER2 | |
67 #define COMPILER2_PRESENT(code) code | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
68 #define NOT_COMPILER2(code) |
0 | 69 #else // COMPILER2 |
70 #define COMPILER2_PRESENT(code) | |
453
c96030fff130
6684579: SoftReference processing can be made more efficient
ysr
parents:
337
diff
changeset
|
71 #define NOT_COMPILER2(code) code |
0 | 72 #endif // COMPILER2 |
73 | |
74 | |
75 // PRODUCT variant | |
76 #ifdef PRODUCT | |
77 #define PRODUCT_ONLY(code) code | |
78 #define NOT_PRODUCT(code) | |
79 #define PRODUCT_RETURN {} | |
80 #define PRODUCT_RETURN0 { return 0; } | |
81 #define PRODUCT_RETURN_(code) { code } | |
82 #else // PRODUCT | |
83 #define PRODUCT_ONLY(code) | |
84 #define NOT_PRODUCT(code) code | |
85 #define PRODUCT_RETURN /*next token must be ;*/ | |
86 #define PRODUCT_RETURN0 /*next token must be ;*/ | |
87 #define PRODUCT_RETURN_(code) /*next token must be ;*/ | |
88 #endif // PRODUCT | |
89 | |
90 #ifdef CHECK_UNHANDLED_OOPS | |
91 #define CHECK_UNHANDLED_OOPS_ONLY(code) code | |
92 #define NOT_CHECK_UNHANDLED_OOPS(code) | |
93 #else | |
94 #define CHECK_UNHANDLED_OOPS_ONLY(code) | |
95 #define NOT_CHECK_UNHANDLED_OOPS(code) code | |
96 #endif // CHECK_UNHANDLED_OOPS | |
97 | |
98 #ifdef CC_INTERP | |
99 #define CC_INTERP_ONLY(code) code | |
100 #define NOT_CC_INTERP(code) | |
101 #else | |
102 #define CC_INTERP_ONLY(code) | |
103 #define NOT_CC_INTERP(code) code | |
104 #endif // CC_INTERP | |
105 | |
106 #ifdef ASSERT | |
107 #define DEBUG_ONLY(code) code | |
108 #define NOT_DEBUG(code) | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
109 #define NOT_DEBUG_RETURN /*next token must be ;*/ |
0 | 110 // Historical. |
111 #define debug_only(code) code | |
112 #else // ASSERT | |
113 #define DEBUG_ONLY(code) | |
114 #define NOT_DEBUG(code) code | |
809
6e2afda171db
6849716: BitMap - performance regression introduced with G1
jcoomes
parents:
453
diff
changeset
|
115 #define NOT_DEBUG_RETURN {} |
0 | 116 #define debug_only(code) |
117 #endif // ASSERT | |
118 | |
119 #ifdef _LP64 | |
120 #define LP64_ONLY(code) code | |
121 #define NOT_LP64(code) | |
122 #else // !_LP64 | |
123 #define LP64_ONLY(code) | |
124 #define NOT_LP64(code) code | |
125 #endif // _LP64 | |
126 | |
127 #ifdef LINUX | |
128 #define LINUX_ONLY(code) code | |
129 #define NOT_LINUX(code) | |
130 #else | |
131 #define LINUX_ONLY(code) | |
132 #define NOT_LINUX(code) code | |
133 #endif | |
134 | |
135 #ifdef SOLARIS | |
136 #define SOLARIS_ONLY(code) code | |
137 #define NOT_SOLARIS(code) | |
138 #else | |
139 #define SOLARIS_ONLY(code) | |
140 #define NOT_SOLARIS(code) code | |
141 #endif | |
142 | |
143 #ifdef _WINDOWS | |
144 #define WINDOWS_ONLY(code) code | |
145 #define NOT_WINDOWS(code) | |
146 #else | |
147 #define WINDOWS_ONLY(code) | |
148 #define NOT_WINDOWS(code) code | |
149 #endif | |
150 | |
304 | 151 #if defined(IA32) || defined(AMD64) |
152 #define X86 | |
153 #define X86_ONLY(code) code | |
1692 | 154 #define NOT_X86(code) |
304 | 155 #else |
156 #undef X86 | |
157 #define X86_ONLY(code) | |
1692 | 158 #define NOT_X86(code) code |
304 | 159 #endif |
160 | |
0 | 161 #ifdef IA32 |
162 #define IA32_ONLY(code) code | |
163 #define NOT_IA32(code) | |
164 #else | |
165 #define IA32_ONLY(code) | |
166 #define NOT_IA32(code) code | |
167 #endif | |
168 | |
169 #ifdef IA64 | |
170 #define IA64_ONLY(code) code | |
171 #define NOT_IA64(code) | |
172 #else | |
173 #define IA64_ONLY(code) | |
174 #define NOT_IA64(code) code | |
175 #endif | |
176 | |
177 #ifdef AMD64 | |
178 #define AMD64_ONLY(code) code | |
179 #define NOT_AMD64(code) | |
180 #else | |
181 #define AMD64_ONLY(code) | |
182 #define NOT_AMD64(code) code | |
183 #endif | |
184 | |
185 #ifdef SPARC | |
186 #define SPARC_ONLY(code) code | |
187 #define NOT_SPARC(code) | |
188 #else | |
189 #define SPARC_ONLY(code) | |
190 #define NOT_SPARC(code) code | |
191 #endif | |
192 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
193 #ifdef PPC |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
194 #define PPC_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
195 #define NOT_PPC(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
196 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
197 #define PPC_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
198 #define NOT_PPC(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
199 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
200 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
201 #ifdef E500V2 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
202 #define E500V2_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
203 #define NOT_E500V2(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
204 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
205 #define E500V2_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
206 #define NOT_E500V2(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
207 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
208 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
209 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
210 #ifdef ARM |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
211 #define ARM_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
212 #define NOT_ARM(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
213 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
214 #define ARM_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
215 #define NOT_ARM(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
216 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
217 |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
218 #ifdef JAVASE_EMBEDDED |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
219 #define EMBEDDED_ONLY(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
220 #define NOT_EMBEDDED(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
221 #else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
222 #define EMBEDDED_ONLY(code) |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
223 #define NOT_EMBEDDED(code) code |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
224 #endif |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
225 |
0 | 226 #define define_pd_global(type, name, value) const type pd_##name = value; |