< prev index next >

src/hotspot/share/utilities/globalDefinitions_gcc.hpp

Print this page

148 // warning. The -Wno-invalid-offsetof option could be used to suppress
149 // this warning, but we instead just avoid the use of offsetof().
150 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
151 
152 #if defined(_LP64) && defined(__APPLE__)
153 #define JLONG_FORMAT          "%ld"
154 #define JLONG_FORMAT_W(width) "%" #width "ld"
155 #endif // _LP64 && __APPLE__
156 
157 #define THREAD_LOCAL __thread
158 
159 // Inlining support
160 #define NOINLINE     __attribute__ ((noinline))
161 #define ALWAYSINLINE inline __attribute__ ((always_inline))
162 #define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
163 
164 // Alignment
165 //
166 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
167 






168 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP

148 // warning. The -Wno-invalid-offsetof option could be used to suppress
149 // this warning, but we instead just avoid the use of offsetof().
150 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
151 
152 #if defined(_LP64) && defined(__APPLE__)
153 #define JLONG_FORMAT          "%ld"
154 #define JLONG_FORMAT_W(width) "%" #width "ld"
155 #endif // _LP64 && __APPLE__
156 
157 #define THREAD_LOCAL __thread
158 
159 // Inlining support
160 #define NOINLINE     __attribute__ ((noinline))
161 #define ALWAYSINLINE inline __attribute__ ((always_inline))
162 #define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
163 
164 // Alignment
165 //
166 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
167 
168 #define LIKELY(condition)   __builtin_expect(static_cast<bool>(condition), 1)
169 #define UNLIKELY(condition) __builtin_expect(static_cast<bool>(condition), 0)
170 
171 #define __COLD __attribute__((cold))
172 #define __HOT  __attribute__((hot))
173 
174 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
< prev index next >