< prev index next >

src/share/vm/utilities/globalDefinitions_gcc.hpp

Print this page




 217 #define BREAKPOINT __asm__ volatile (".long 0xe1200070")
 218 #else
 219 #define BREAKPOINT __asm__ volatile (".long 0xe7f001f0")
 220 #endif
 221 #else
 222 extern "C" void breakpoint();
 223 #define BREAKPOINT ::breakpoint()
 224 #endif
 225 
 226 // checking for nanness
 227 #ifdef SOLARIS
 228 #ifdef SPARC
 229 inline int g_isnan(float  f) { return isnanf(f); }
 230 #else
 231 // isnanf() broken on Intel Solaris use isnand()
 232 inline int g_isnan(float  f) { return isnand(f); }
 233 #endif
 234 inline int g_isnan(double f) { return isnand(f); }
 235 #elif defined(__APPLE__)
 236 inline int g_isnan(double f) { return isnan(f); }
 237 #elif defined(LINUX) || defined(_ALLBSD_SOURCE)





 238 inline int g_isnan(float  f) { return isnanf(f); }
 239 inline int g_isnan(double f) { return isnan(f); }
 240 #else
 241 #error "missing platform-specific definition here"
 242 #endif
 243 
 244 // GCC 4.3 does not allow 0.0/0.0 to produce a NAN value
 245 #if (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
 246 #define CAN_USE_NAN_DEFINE 1
 247 #endif
 248 
 249 
 250 // Checking for finiteness
 251 





 252 inline int g_isfinite(jfloat  f)                 { return finite(f); }
 253 inline int g_isfinite(jdouble f)                 { return finite(f); }

 254 
 255 
 256 // Wide characters
 257 
 258 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
 259 
 260 
 261 // Portability macros
 262 #define PRAGMA_INTERFACE             #pragma interface
 263 #define PRAGMA_IMPLEMENTATION        #pragma implementation
 264 #define VALUE_OBJ_CLASS_SPEC
 265 
 266 #ifndef ATTRIBUTE_PRINTF
 267 // Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
 268 // were only introduced in GCC 4.2. Because we have no other possibility to ignore
 269 // these warnings for older versions of GCC, we simply don't decorate our printf-style
 270 // functions with __attribute__(format) in that case.
 271 #if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
 272 #define ATTRIBUTE_PRINTF(fmt,vargs)  __attribute__((format(printf, fmt, vargs)))
 273 #else




 217 #define BREAKPOINT __asm__ volatile (".long 0xe1200070")
 218 #else
 219 #define BREAKPOINT __asm__ volatile (".long 0xe7f001f0")
 220 #endif
 221 #else
 222 extern "C" void breakpoint();
 223 #define BREAKPOINT ::breakpoint()
 224 #endif
 225 
 226 // checking for nanness
 227 #ifdef SOLARIS
 228 #ifdef SPARC
 229 inline int g_isnan(float  f) { return isnanf(f); }
 230 #else
 231 // isnanf() broken on Intel Solaris use isnand()
 232 inline int g_isnan(float  f) { return isnand(f); }
 233 #endif
 234 inline int g_isnan(double f) { return isnand(f); }
 235 #elif defined(__APPLE__)
 236 inline int g_isnan(double f) { return isnan(f); }
 237 #elif defined(LINUX)
 238 // Linux libc without BSD extensions not required
 239 // to have isnanf, but should have isnan macro
 240 inline int g_isnan(float  f) { return isnan(f); }
 241 inline int g_isnan(double f) { return isnan(f); }
 242 #elif defined(_ALLBSD_SOURCE)
 243 inline int g_isnan(float  f) { return isnanf(f); }
 244 inline int g_isnan(double f) { return isnan(f); }
 245 #else
 246 #error "missing platform-specific definition here"
 247 #endif
 248 
 249 // GCC 4.3 does not allow 0.0/0.0 to produce a NAN value
 250 #if (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
 251 #define CAN_USE_NAN_DEFINE 1
 252 #endif
 253 
 254 
 255 // Checking for finiteness
 256 
 257 #if defined(LINUX)
 258 // Linux libc without BSD extensions have no finite, but has isfinite
 259 inline int g_isfinite(jfloat  f)                 { return isfinite(f); }
 260 inline int g_isfinite(jdouble f)                 { return isfinite(f); }
 261 #else
 262 inline int g_isfinite(jfloat  f)                 { return finite(f); }
 263 inline int g_isfinite(jdouble f)                 { return finite(f); }
 264 #endif
 265 
 266 
 267 // Wide characters
 268 
 269 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
 270 
 271 
 272 // Portability macros
 273 #define PRAGMA_INTERFACE             #pragma interface
 274 #define PRAGMA_IMPLEMENTATION        #pragma implementation
 275 #define VALUE_OBJ_CLASS_SPEC
 276 
 277 #ifndef ATTRIBUTE_PRINTF
 278 // Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
 279 // were only introduced in GCC 4.2. Because we have no other possibility to ignore
 280 // these warnings for older versions of GCC, we simply don't decorate our printf-style
 281 // functions with __attribute__(format) in that case.
 282 #if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
 283 #define ATTRIBUTE_PRINTF(fmt,vargs)  __attribute__((format(printf, fmt, vargs)))
 284 #else


< prev index next >