112 inline int g_isnan(float f) { return isnan(f); }
113 inline int g_isnan(double f) { return isnan(f); }
114 #else
115 #error "missing platform-specific definition here"
116 #endif
117
118 // Checking for finiteness
119
120 inline int g_isfinite(jfloat f) { return finite(f); }
121 inline int g_isfinite(jdouble f) { return finite(f); }
122
123
124 // Wide characters
125
126 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
127
128
129 // Portability macros
130 #define PRAGMA_INTERFACE #pragma interface
131 #define PRAGMA_IMPLEMENTATION #pragma implementation
132 #define VALUE_OBJ_CLASS_SPEC
133
134 // Formatting.
135 #ifdef _LP64
136 #define FORMAT64_MODIFIER "l"
137 #else // !_LP64
138 #define FORMAT64_MODIFIER "ll"
139 #endif // _LP64
140
141 // Cannot use xlc's offsetof as implementation of hotspot's
142 // offset_of(), because xlc warns about applying offsetof() to non-POD
143 // object and xlc cannot compile the expression offsetof(DataLayout,
144 // _cells[index]) in DataLayout::cell_offset() . Therefore we define
145 // offset_of as it is defined for gcc.
146 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
147
148 // AIX 5.3 has buggy __thread support. (see JDK-8176442).
149 #define USE_LIBRARY_BASED_TLS_ONLY 1
150
151 #ifndef USE_LIBRARY_BASED_TLS_ONLY
152 #define THREAD_LOCAL_DECL __thread
|
112 inline int g_isnan(float f) { return isnan(f); }
113 inline int g_isnan(double f) { return isnan(f); }
114 #else
115 #error "missing platform-specific definition here"
116 #endif
117
118 // Checking for finiteness
119
120 inline int g_isfinite(jfloat f) { return finite(f); }
121 inline int g_isfinite(jdouble f) { return finite(f); }
122
123
124 // Wide characters
125
126 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
127
128
129 // Portability macros
130 #define PRAGMA_INTERFACE #pragma interface
131 #define PRAGMA_IMPLEMENTATION #pragma implementation
132
133 // Formatting.
134 #ifdef _LP64
135 #define FORMAT64_MODIFIER "l"
136 #else // !_LP64
137 #define FORMAT64_MODIFIER "ll"
138 #endif // _LP64
139
140 // Cannot use xlc's offsetof as implementation of hotspot's
141 // offset_of(), because xlc warns about applying offsetof() to non-POD
142 // object and xlc cannot compile the expression offsetof(DataLayout,
143 // _cells[index]) in DataLayout::cell_offset() . Therefore we define
144 // offset_of as it is defined for gcc.
145 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
146
147 // AIX 5.3 has buggy __thread support. (see JDK-8176442).
148 #define USE_LIBRARY_BASED_TLS_ONLY 1
149
150 #ifndef USE_LIBRARY_BASED_TLS_ONLY
151 #define THREAD_LOCAL_DECL __thread
|