src/share/vm/utilities/macros.hpp

Wed, 11 Aug 2010 05:51:21 -0700

author
twisti
date
Wed, 11 Aug 2010 05:51:21 -0700
changeset 2047
d2ede61b7a12
parent 2036
126ea7725993
child 2123
6ee479178066
child 2138
d5d065957597
permissions
-rw-r--r--

6976186: integrate Shark HotSpot changes
Summary: Shark is a JIT compiler for Zero that uses the LLVM compiler infrastructure.
Reviewed-by: kvn, twisti
Contributed-by: Gary Benson <gbenson@redhat.com>

     1 /*
     2  * Copyright (c) 1997, 2010, 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  */
    25 // Use this to mark code that needs to be cleaned up (for development only)
    26 #define NEEDS_CLEANUP
    28 // Makes a string of the argument (which is not macro-expanded)
    29 #define STR(a)  #a
    31 // Makes a string of the macro expansion of a
    32 #define XSTR(a) STR(a)
    34 // KERNEL variant
    35 #ifdef KERNEL
    36 #define COMPILER1
    37 #define SERIALGC
    39 #define JVMTI_KERNEL
    40 #define FPROF_KERNEL
    41 #define VM_STRUCTS_KERNEL
    42 #define JNICHECK_KERNEL
    43 #define SERVICES_KERNEL
    45 #define KERNEL_RETURN        {}
    46 #define KERNEL_RETURN_(code) { code }
    48 #else  // KERNEL
    50 #define KERNEL_RETURN        /* next token must be ; */
    51 #define KERNEL_RETURN_(code) /* next token must be ; */
    53 #endif // KERNEL
    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
    65 // COMPILER2 variant
    66 #ifdef COMPILER2
    67 #define COMPILER2_PRESENT(code) code
    68 #define NOT_COMPILER2(code)
    69 #else // COMPILER2
    70 #define COMPILER2_PRESENT(code)
    71 #define NOT_COMPILER2(code) code
    72 #endif // COMPILER2
    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
    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
    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
   106 #ifdef ASSERT
   107 #define DEBUG_ONLY(code) code
   108 #define NOT_DEBUG(code)
   109 #define NOT_DEBUG_RETURN  /*next token must be ;*/
   110 // Historical.
   111 #define debug_only(code) code
   112 #else // ASSERT
   113 #define DEBUG_ONLY(code)
   114 #define NOT_DEBUG(code) code
   115 #define NOT_DEBUG_RETURN {}
   116 #define debug_only(code)
   117 #endif // ASSERT
   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
   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
   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
   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
   151 #if defined(IA32) || defined(AMD64)
   152 #define X86
   153 #define X86_ONLY(code) code
   154 #define NOT_X86(code)
   155 #else
   156 #undef X86
   157 #define X86_ONLY(code)
   158 #define NOT_X86(code) code
   159 #endif
   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
   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
   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
   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
   193 #ifdef PPC
   194 #define PPC_ONLY(code) code
   195 #define NOT_PPC(code)
   196 #else
   197 #define PPC_ONLY(code)
   198 #define NOT_PPC(code) code
   199 #endif
   201 #ifdef E500V2
   202 #define E500V2_ONLY(code) code
   203 #define NOT_E500V2(code)
   204 #else
   205 #define E500V2_ONLY(code)
   206 #define NOT_E500V2(code) code
   207 #endif
   210 #ifdef ARM
   211 #define ARM_ONLY(code) code
   212 #define NOT_ARM(code)
   213 #else
   214 #define ARM_ONLY(code)
   215 #define NOT_ARM(code) code
   216 #endif
   218 #ifdef JAVASE_EMBEDDED
   219 #define EMBEDDED_ONLY(code) code
   220 #define NOT_EMBEDDED(code)
   221 #else
   222 #define EMBEDDED_ONLY(code)
   223 #define NOT_EMBEDDED(code) code
   224 #endif
   226 #define define_pd_global(type, name, value) const type pd_##name = value;

mercurial