1 /*
  2  * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
  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  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_UTILITIES_MACROS_HPP
 26 #define SHARE_UTILITIES_MACROS_HPP
 27 
 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 // Allow commas in macro arguments.
 38 #define COMMA ,
 39 
 40 // Apply pre-processor token pasting to the expansions of x and y.
 41 // The token pasting operator (##) prevents its arguments from being
 42 // expanded.  This macro allows expansion of its arguments before the
 43 // concatenation is performed.  Note: One auxilliary level ought to be
 44 // sufficient, but two are used because of bugs in some preprocesors.
 45 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
 46 #define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y)
 47 #define PASTE_TOKENS_AUX2(x, y) x ## y
 48 
 49 // -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
 50 // or exclude functionality.
 51 
 52 #ifndef FILE_AND_LINE
 53 #define FILE_AND_LINE __FILE__ ":" XSTR(__LINE__)
 54 #endif
 55 
 56 #ifndef INCLUDE_JVMTI
 57 #define INCLUDE_JVMTI 1
 58 #endif  // INCLUDE_JVMTI
 59 
 60 #if INCLUDE_JVMTI
 61 #define JVMTI_ONLY(x) x
 62 #define NOT_JVMTI(x)
 63 #define NOT_JVMTI_RETURN
 64 #define NOT_JVMTI_RETURN_(code) /* next token must be ; */
 65 #else
 66 #define JVMTI_ONLY(x)
 67 #define NOT_JVMTI(x) x
 68 #define NOT_JVMTI_RETURN { return; }
 69 #define NOT_JVMTI_RETURN_(code) { return code; }
 70 #endif // INCLUDE_JVMTI
 71 
 72 #ifndef INCLUDE_VM_STRUCTS
 73 #define INCLUDE_VM_STRUCTS 1
 74 #endif
 75 
 76 #if INCLUDE_VM_STRUCTS
 77 #define NOT_VM_STRUCTS_RETURN        /* next token must be ; */
 78 #define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */
 79 #else
 80 #define NOT_VM_STRUCTS_RETURN           {}
 81 #define NOT_VM_STRUCTS_RETURN_(code) { return code; }
 82 #endif // INCLUDE_VM_STRUCTS
 83 
 84 #ifndef INCLUDE_JNI_CHECK
 85 #define INCLUDE_JNI_CHECK 1
 86 #endif
 87 
 88 #if INCLUDE_JNI_CHECK
 89 #define NOT_JNI_CHECK_RETURN        /* next token must be ; */
 90 #define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */
 91 #else
 92 #define NOT_JNI_CHECK_RETURN            {}
 93 #define NOT_JNI_CHECK_RETURN_(code) { return code; }
 94 #endif // INCLUDE_JNI_CHECK
 95 
 96 #ifndef INCLUDE_SERVICES
 97 #define INCLUDE_SERVICES 1
 98 #endif
 99 
100 #if INCLUDE_SERVICES
101 #define NOT_SERVICES_RETURN        /* next token must be ; */
102 #define NOT_SERVICES_RETURN_(code) /* next token must be ; */
103 #else
104 #define NOT_SERVICES_RETURN             {}
105 #define NOT_SERVICES_RETURN_(code) { return code; }
106 #endif // INCLUDE_SERVICES
107 
108 #ifndef INCLUDE_CDS
109 #define INCLUDE_CDS 1
110 #endif
111 
112 #if INCLUDE_CDS
113 #define CDS_ONLY(x) x
114 #define NOT_CDS(x)
115 #define NOT_CDS_RETURN        /* next token must be ; */
116 #define NOT_CDS_RETURN0       /* next token must be ; */
117 #define NOT_CDS_RETURN_(code) /* next token must be ; */
118 #else
119 #define CDS_ONLY(x)
120 #define NOT_CDS(x) x
121 #define NOT_CDS_RETURN        {}
122 #define NOT_CDS_RETURN0       { return 0; }
123 #define NOT_CDS_RETURN_(code) { return code; }
124 #endif // INCLUDE_CDS
125 
126 #ifndef INCLUDE_MANAGEMENT
127 #define INCLUDE_MANAGEMENT 1
128 #endif // INCLUDE_MANAGEMENT
129 
130 #if INCLUDE_MANAGEMENT
131 #define NOT_MANAGEMENT_RETURN        /* next token must be ; */
132 #define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */
133 #define MANAGEMENT_ONLY(x) x
134 #else
135 #define NOT_MANAGEMENT_RETURN        {}
136 #define NOT_MANAGEMENT_RETURN_(code) { return code; }
137 #define MANAGEMENT_ONLY(x)
138 #endif // INCLUDE_MANAGEMENT
139 
140 #ifndef INCLUDE_EPSILONGC
141 #define INCLUDE_EPSILONGC 1
142 #endif // INCLUDE_EPSILONGC
143 
144 #if INCLUDE_EPSILONGC
145 #define EPSILONGC_ONLY(x) x
146 #define EPSILONGC_ONLY_ARG(arg) arg,
147 #define NOT_EPSILONGC(x)
148 #define NOT_EPSILONGC_RETURN        /* next token must be ; */
149 #define NOT_EPSILONGC_RETURN_(code) /* next token must be ; */
150 #else
151 #define EPSILONGC_ONLY(x)
152 #define EPSILONGC_ONLY_ARG(arg)
153 #define NOT_EPSILONGC(x) x
154 #define NOT_EPSILONGC_RETURN        {}
155 #define NOT_EPSILONGC_RETURN_(code) { return code; }
156 #endif // INCLUDE_EPSILONGC
157 
158 #ifndef INCLUDE_G1GC
159 #define INCLUDE_G1GC 1
160 #endif // INCLUDE_G1GC
161 
162 #if INCLUDE_G1GC
163 #define G1GC_ONLY(x) x
164 #define G1GC_ONLY_ARG(arg) arg,
165 #define NOT_G1GC(x)
166 #define NOT_G1GC_RETURN        /* next token must be ; */
167 #define NOT_G1GC_RETURN_(code) /* next token must be ; */
168 #else
169 #define G1GC_ONLY(x)
170 #define G1GC_ONLY_ARG(arg)
171 #define NOT_G1GC(x) x
172 #define NOT_G1GC_RETURN        {}
173 #define NOT_G1GC_RETURN_(code) { return code; }
174 #endif // INCLUDE_G1GC
175 
176 #ifndef INCLUDE_PARALLELGC
177 #define INCLUDE_PARALLELGC 1
178 #endif // INCLUDE_PARALLELGC
179 
180 #if INCLUDE_PARALLELGC
181 #define PARALLELGC_ONLY(x) x
182 #define PARALLELGC_ONLY_ARG(arg) arg,
183 #define NOT_PARALLELGC(x)
184 #define NOT_PARALLELGC_RETURN        /* next token must be ; */
185 #define NOT_PARALLELGC_RETURN_(code) /* next token must be ; */
186 #else
187 #define PARALLELGC_ONLY(x)
188 #define PARALLELGC_ONLY_ARG(arg)
189 #define NOT_PARALLELGC(x) x
190 #define NOT_PARALLELGC_RETURN        {}
191 #define NOT_PARALLELGC_RETURN_(code) { return code; }
192 #endif // INCLUDE_PARALLELGC
193 
194 #ifndef INCLUDE_SERIALGC
195 #define INCLUDE_SERIALGC 1
196 #endif // INCLUDE_SERIALGC
197 
198 #if INCLUDE_SERIALGC
199 #define SERIALGC_ONLY(x) x
200 #define SERIALGC_ONLY_ARG(arg) arg,
201 #define NOT_SERIALGC(x)
202 #define NOT_SERIALGC_RETURN        /* next token must be ; */
203 #define NOT_SERIALGC_RETURN_(code) /* next token must be ; */
204 #else
205 #define SERIALGC_ONLY(x)
206 #define SERIALGC_ONLY_ARG(arg)
207 #define NOT_SERIALGC(x) x
208 #define NOT_SERIALGC_RETURN        {}
209 #define NOT_SERIALGC_RETURN_(code) { return code; }
210 #endif // INCLUDE_SERIALGC
211 
212 #ifndef INCLUDE_SHENANDOAHGC
213 #define INCLUDE_SHENANDOAHGC 1
214 #endif // INCLUDE_SHENANDOAHGC
215 
216 #if INCLUDE_SHENANDOAHGC
217 #define SHENANDOAHGC_ONLY(x) x
218 #define SHENANDOAHGC_ONLY_ARG(arg) arg,
219 #define NOT_SHENANDOAHGC(x)
220 #define NOT_SHENANDOAHGC_RETURN        /* next token must be ; */
221 #define NOT_SHENANDOAHGC_RETURN_(code) /* next token must be ; */
222 #else
223 #define SHENANDOAHGC_ONLY(x)
224 #define SHENANDOAHGC_ONLY_ARG(arg)
225 #define NOT_SHENANDOAHGC(x) x
226 #define NOT_SHENANDOAHGC_RETURN        {}
227 #define NOT_SHENANDOAHGC_RETURN_(code) { return code; }
228 #endif // INCLUDE_SHENANDOAHGC
229 
230 #ifndef INCLUDE_ZGC
231 #define INCLUDE_ZGC 1
232 #endif // INCLUDE_ZGC
233 
234 #if INCLUDE_ZGC
235 #define ZGC_ONLY(x) x
236 #define ZGC_ONLY_ARG(arg) arg,
237 #define NOT_ZGC(x)
238 #define NOT_ZGC_RETURN        /* next token must be ; */
239 #define NOT_ZGC_RETURN_(code) /* next token must be ; */
240 #else
241 #define ZGC_ONLY(x)
242 #define ZGC_ONLY_ARG(arg)
243 #define NOT_ZGC(x) x
244 #define NOT_ZGC_RETURN        {}
245 #define NOT_ZGC_RETURN_(code) { return code; }
246 #endif // INCLUDE_ZGC
247 
248 #ifndef INCLUDE_NMT
249 #define INCLUDE_NMT 1
250 #endif // INCLUDE_NMT
251 
252 #if INCLUDE_NMT
253 #define NOT_NMT_RETURN        /* next token must be ; */
254 #define NOT_NMT_RETURN_(code) /* next token must be ; */
255 #define NMT_ONLY(x) x
256 #define NOT_NMT(x)
257 #else
258 #define NOT_NMT_RETURN        {}
259 #define NOT_NMT_RETURN_(code) { return code; }
260 #define NMT_ONLY(x)
261 #define NOT_NMT(x) x
262 #endif // INCLUDE_NMT
263 
264 #ifndef INCLUDE_JFR
265 #define INCLUDE_JFR 1
266 #endif
267 
268 #if INCLUDE_JFR
269 #define JFR_ONLY(code) code
270 #define NOT_JFR_RETURN()      /* next token must be ; */
271 #define NOT_JFR_RETURN_(code) /* next token must be ; */
272 #else
273 #define JFR_ONLY(code)
274 #define NOT_JFR_RETURN()      {}
275 #define NOT_JFR_RETURN_(code) { return code; }
276 #endif
277 
278 #ifndef INCLUDE_JVMCI
279 #define INCLUDE_JVMCI 1
280 #endif
281 
282 #if INCLUDE_JVMCI
283 #define JVMCI_ONLY(code) code
284 #define NOT_JVMCI(code)
285 #define NOT_JVMCI_RETURN /* next token must be ; */
286 #else
287 #define JVMCI_ONLY(code)
288 #define NOT_JVMCI(code) code
289 #define NOT_JVMCI_RETURN {}
290 #endif // INCLUDE_JVMCI
291 
292 // COMPILER1 variant
293 #ifdef COMPILER1
294 #define COMPILER1_PRESENT(code) code
295 #define NOT_COMPILER1(code)
296 #else // COMPILER1
297 #define COMPILER1_PRESENT(code)
298 #define NOT_COMPILER1(code) code
299 #endif // COMPILER1
300 
301 // COMPILER2 variant
302 #ifdef COMPILER2
303 #define COMPILER2_PRESENT(code) code
304 #define NOT_COMPILER2(code)
305 #else // COMPILER2
306 #define COMPILER2_PRESENT(code)
307 #define NOT_COMPILER2(code) code
308 #endif // COMPILER2
309 
310 // COMPILER2 or JVMCI
311 #if defined(COMPILER2) || INCLUDE_JVMCI
312 #define COMPILER2_OR_JVMCI 1
313 #define COMPILER2_OR_JVMCI_PRESENT(code) code
314 #define NOT_COMPILER2_OR_JVMCI(code)
315 #define NOT_COMPILER2_OR_JVMCI_RETURN        /* next token must be ; */
316 #define NOT_COMPILER2_OR_JVMCI_RETURN_(code) /* next token must be ; */
317 #else
318 #define COMPILER2_OR_JVMCI 0
319 #define COMPILER2_OR_JVMCI_PRESENT(code)
320 #define NOT_COMPILER2_OR_JVMCI(code) code
321 #define NOT_COMPILER2_OR_JVMCI_RETURN {}
322 #define NOT_COMPILER2_OR_JVMCI_RETURN_(code) { return code; }
323 #endif
324 
325 // COMPILER1 and COMPILER2
326 #if defined(COMPILER1) && defined(COMPILER2)
327 #define COMPILER1_AND_COMPILER2 1
328 #define COMPILER1_AND_COMPILER2_PRESENT(code) code
329 #else
330 #define COMPILER1_AND_COMPILER2 0
331 #define COMPILER1_AND_COMPILER2_PRESENT(code)
332 #endif
333 
334 // COMPILER1 or COMPILER2
335 #if defined(COMPILER1) || defined(COMPILER2)
336 #define COMPILER1_OR_COMPILER2 1
337 #define COMPILER1_OR_COMPILER2_PRESENT(code) code
338 #else
339 #define COMPILER1_OR_COMPILER2 0
340 #define COMPILER1_OR_COMPILER2_PRESENT(code)
341 #endif
342 
343 
344 // PRODUCT variant
345 #ifdef PRODUCT
346 #define PRODUCT_ONLY(code) code
347 #define NOT_PRODUCT(code)
348 #define NOT_PRODUCT_ARG(arg)
349 #define PRODUCT_RETURN  {}
350 #define PRODUCT_RETURN0 { return 0; }
351 #define PRODUCT_RETURN_(code) { code }
352 #else // PRODUCT
353 #define PRODUCT_ONLY(code)
354 #define NOT_PRODUCT(code) code
355 #define NOT_PRODUCT_ARG(arg) arg,
356 #define PRODUCT_RETURN  /*next token must be ;*/
357 #define PRODUCT_RETURN0 /*next token must be ;*/
358 #define PRODUCT_RETURN_(code)  /*next token must be ;*/
359 #endif // PRODUCT
360 
361 #ifdef CHECK_UNHANDLED_OOPS
362 #define CHECK_UNHANDLED_OOPS_ONLY(code) code
363 #define NOT_CHECK_UNHANDLED_OOPS(code)
364 #else
365 #define CHECK_UNHANDLED_OOPS_ONLY(code)
366 #define NOT_CHECK_UNHANDLED_OOPS(code)  code
367 #endif // CHECK_UNHANDLED_OOPS
368 
369 #ifdef ASSERT
370 #define DEBUG_ONLY(code) code
371 #define NOT_DEBUG(code)
372 #define NOT_DEBUG_RETURN  /*next token must be ;*/
373 // Historical.
374 #define debug_only(code) code
375 #else // ASSERT
376 #define DEBUG_ONLY(code)
377 #define NOT_DEBUG(code) code
378 #define NOT_DEBUG_RETURN {}
379 #define debug_only(code)
380 #endif // ASSERT
381 
382 #ifdef  _LP64
383 #define LP64_ONLY(code) code
384 #define NOT_LP64(code)
385 #else  // !_LP64
386 #define LP64_ONLY(code)
387 #define NOT_LP64(code) code
388 #endif // _LP64
389 
390 #ifdef LINUX
391 #define LINUX_ONLY(code) code
392 #define NOT_LINUX(code)
393 #else
394 #define LINUX_ONLY(code)
395 #define NOT_LINUX(code) code
396 #endif
397 
398 #ifdef __APPLE__
399 #define MACOS_ONLY(code) code
400 #define NOT_MACOS(code)
401 #else
402 #define MACOS_ONLY(code)
403 #define NOT_MACOS(code) code
404 #endif
405 
406 #ifdef AIX
407 #define AIX_ONLY(code) code
408 #define NOT_AIX(code)
409 #else
410 #define AIX_ONLY(code)
411 #define NOT_AIX(code) code
412 #endif
413 
414 #ifdef _WINDOWS
415 #define WINDOWS_ONLY(code) code
416 #define NOT_WINDOWS(code)
417 #else
418 #define WINDOWS_ONLY(code)
419 #define NOT_WINDOWS(code) code
420 #endif
421 
422 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
423 #ifndef BSD
424 #define BSD
425 #endif // BSD defined in <sys/param.h>
426 #define BSD_ONLY(code) code
427 #define NOT_BSD(code)
428 #else
429 #define BSD_ONLY(code)
430 #define NOT_BSD(code) code
431 #endif
432 
433 #ifdef _WIN64
434 #define WIN64_ONLY(code) code
435 #define NOT_WIN64(code)
436 #else
437 #define WIN64_ONLY(code)
438 #define NOT_WIN64(code) code
439 #endif
440 
441 #if defined(ZERO)
442 #define ZERO_ONLY(code) code
443 #define NOT_ZERO(code)
444 #define NOT_ZERO_RETURN {}
445 #else
446 #define ZERO_ONLY(code)
447 #define NOT_ZERO(code) code
448 #define NOT_ZERO_RETURN
449 #endif
450 
451 #if defined(IA32) || defined(AMD64)
452 #define X86
453 #define X86_ONLY(code) code
454 #define NOT_X86(code)
455 #else
456 #undef X86
457 #define X86_ONLY(code)
458 #define NOT_X86(code) code
459 #endif
460 
461 #ifdef IA32
462 #define IA32_ONLY(code) code
463 #define NOT_IA32(code)
464 #else
465 #define IA32_ONLY(code)
466 #define NOT_IA32(code) code
467 #endif
468 
469 // This is a REALLY BIG HACK, but on AIX <sys/systemcfg.h> unconditionally defines IA64.
470 // At least on AIX 7.1 this is a real problem because 'systemcfg.h' is indirectly included
471 // by 'pthread.h' and other common system headers.
472 
473 #if defined(IA64) && !defined(AIX)
474 #define IA64_ONLY(code) code
475 #define NOT_IA64(code)
476 #else
477 #define IA64_ONLY(code)
478 #define NOT_IA64(code) code
479 #endif
480 
481 #ifdef AMD64
482 #define AMD64_ONLY(code) code
483 #define NOT_AMD64(code)
484 #else
485 #define AMD64_ONLY(code)
486 #define NOT_AMD64(code) code
487 #endif
488 
489 #ifdef S390
490 #define S390_ONLY(code) code
491 #define NOT_S390(code)
492 #else
493 #define S390_ONLY(code)
494 #define NOT_S390(code) code
495 #endif
496 
497 #if defined(PPC32) || defined(PPC64)
498 #ifndef PPC
499 #define PPC
500 #endif
501 #define PPC_ONLY(code) code
502 #define NOT_PPC(code)
503 #else
504 #undef PPC
505 #define PPC_ONLY(code)
506 #define NOT_PPC(code) code
507 #endif
508 
509 #ifdef PPC32
510 #define PPC32_ONLY(code) code
511 #define NOT_PPC32(code)
512 #else
513 #define PPC32_ONLY(code)
514 #define NOT_PPC32(code) code
515 #endif
516 
517 #ifdef PPC64
518 #define PPC64_ONLY(code) code
519 #define NOT_PPC64(code)
520 #else
521 #define PPC64_ONLY(code)
522 #define NOT_PPC64(code) code
523 #endif
524 
525 #ifdef E500V2
526 #define E500V2_ONLY(code) code
527 #define NOT_E500V2(code)
528 #else
529 #define E500V2_ONLY(code)
530 #define NOT_E500V2(code) code
531 #endif
532 
533 // Note: There are two ARM ports. They set the following in the makefiles:
534 // 1. 32-bit port:   -DARM -DARM32 -DTARGET_ARCH_arm
535 // 2. 64-bit port:   -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64
536 #ifdef ARM
537 #define ARM_ONLY(code) code
538 #define NOT_ARM(code)
539 #else
540 #define ARM_ONLY(code)
541 #define NOT_ARM(code) code
542 #endif
543 
544 #ifdef ARM32
545 #define ARM32_ONLY(code) code
546 #define NOT_ARM32(code)
547 #else
548 #define ARM32_ONLY(code)
549 #define NOT_ARM32(code) code
550 #endif
551 
552 #ifdef AARCH64
553 #define AARCH64_ONLY(code) code
554 #define NOT_AARCH64(code)
555 #else
556 #define AARCH64_ONLY(code)
557 #define NOT_AARCH64(code) code
558 #endif
559 
560 #define MACOS_AARCH64_ONLY(x) MACOS_ONLY(AARCH64_ONLY(x))
561 
562 #ifdef VM_LITTLE_ENDIAN
563 #define LITTLE_ENDIAN_ONLY(code) code
564 #define BIG_ENDIAN_ONLY(code)
565 #else
566 #define LITTLE_ENDIAN_ONLY(code)
567 #define BIG_ENDIAN_ONLY(code) code
568 #endif
569 
570 #define define_pd_global(type, name, value) const type pd_##name = value;
571 
572 // Helper macros for constructing file names for includes.
573 #define CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU)
574 #define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS)
575 #define OS_CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, PASTE_TOKENS(INCLUDE_SUFFIX_OS, INCLUDE_SUFFIX_CPU))
576 #define COMPILER_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_COMPILER)
577 
578 // Include platform dependent files.
579 //
580 // This macro constructs from basename and INCLUDE_SUFFIX_OS /
581 // INCLUDE_SUFFIX_CPU / INCLUDE_SUFFIX_COMPILER, which are set on
582 // the command line, the name of platform dependent files to be included.
583 // Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_x86
584 //   CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_x86.inline.hpp
585 //   OS_CPU_HEADER(vmStructs)          --> vmStructs_linux_x86.hpp
586 //
587 // basename<cpu>.hpp / basename<cpu>.inline.hpp
588 #define CPU_HEADER_H(basename)         XSTR(CPU_HEADER_STEM(basename).h)
589 #define CPU_HEADER(basename)           XSTR(CPU_HEADER_STEM(basename).hpp)
590 #define CPU_HEADER_INLINE(basename)    XSTR(CPU_HEADER_STEM(basename).inline.hpp)
591 // basename<os>.hpp / basename<os>.inline.hpp
592 #define OS_HEADER_H(basename)          XSTR(OS_HEADER_STEM(basename).h)
593 #define OS_HEADER(basename)            XSTR(OS_HEADER_STEM(basename).hpp)
594 #define OS_HEADER_INLINE(basename)     XSTR(OS_HEADER_STEM(basename).inline.hpp)
595 // basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp
596 #define OS_CPU_HEADER(basename)        XSTR(OS_CPU_HEADER_STEM(basename).hpp)
597 #define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
598 // basename<compiler>.hpp / basename<compiler>.inline.hpp
599 #define COMPILER_HEADER(basename)        XSTR(COMPILER_HEADER_STEM(basename).hpp)
600 #define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
601 
602 #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS)
603 #define INCLUDE_CDS_JAVA_HEAP 1
604 #define CDS_JAVA_HEAP_ONLY(x) x
605 #define NOT_CDS_JAVA_HEAP(x)
606 #define NOT_CDS_JAVA_HEAP_RETURN
607 #define NOT_CDS_JAVA_HEAP_RETURN_(code)
608 #else
609 #define INCLUDE_CDS_JAVA_HEAP 0
610 #define CDS_JAVA_HEAP_ONLY(x)
611 #define NOT_CDS_JAVA_HEAP(x) x
612 #define NOT_CDS_JAVA_HEAP_RETURN        {}
613 #define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; }
614 #endif
615 
616 #endif // SHARE_UTILITIES_MACROS_HPP
--- EOF ---