142 #else // !_LP64
143 #define FORMAT64_MODIFIER "ll"
144 #endif // _LP64
145
146 // gcc warns about applying offsetof() to non-POD object or calculating
147 // offset directly when base address is NULL. Use 16 to get around the
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
163 // Alignment
164 //
165 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
166
167 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
|
142 #else // !_LP64
143 #define FORMAT64_MODIFIER "ll"
144 #endif // _LP64
145
146 // gcc warns about applying offsetof() to non-POD object or calculating
147 // offset directly when base address is NULL. Use 16 to get around the
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
|