< prev index next >

src/hotspot/share/utilities/globalDefinitions_gcc.hpp

Print this page




 258 #define THREAD_LOCAL_DECL __thread
 259 #endif
 260 
 261 // Inlining support
 262 #define NOINLINE     __attribute__ ((noinline))
 263 #define ALWAYSINLINE inline __attribute__ ((always_inline))
 264 
 265 // Alignment
 266 //
 267 // NOTE! The "+0" below is a workaround for a known bug in older GCC versions
 268 // (known to fail with 4.6.0, fixed in 4.9.0). This bug affects systems such as
 269 // RedHat/Oracle Linux 7.5, which ships with GCC 4.8.5. For more details, see
 270 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382 and
 271 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53017
 272 //
 273 // GCC versions older than 4.6.4 would fail even with "+0", and needs additional
 274 // cast to __typeof__(x) to work around the similar bug.
 275 //
 276 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned((__typeof__(x))x+0)))
 277 






 278 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP


 258 #define THREAD_LOCAL_DECL __thread
 259 #endif
 260 
 261 // Inlining support
 262 #define NOINLINE     __attribute__ ((noinline))
 263 #define ALWAYSINLINE inline __attribute__ ((always_inline))
 264 
 265 // Alignment
 266 //
 267 // NOTE! The "+0" below is a workaround for a known bug in older GCC versions
 268 // (known to fail with 4.6.0, fixed in 4.9.0). This bug affects systems such as
 269 // RedHat/Oracle Linux 7.5, which ships with GCC 4.8.5. For more details, see
 270 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382 and
 271 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53017
 272 //
 273 // GCC versions older than 4.6.4 would fail even with "+0", and needs additional
 274 // cast to __typeof__(x) to work around the similar bug.
 275 //
 276 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned((__typeof__(x))x+0)))
 277 
 278 #define LIKELY(condition)   __builtin_expect(static_cast<bool>(condition), 1)
 279 #define UNLIKELY(condition) __builtin_expect(static_cast<bool>(condition), 0)
 280 
 281 #define __COLD __attribute__((cold))
 282 #define __HOT  __attribute__((hot))
 283 
 284 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
< prev index next >