< prev index next >

src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp

Print this page




 275     }
 276   }
 277   assert(fr->is_java_frame(), "Safety check");
 278   return true;
 279 }
 280 
 281 frame os::get_sender_for_C_frame(frame* fr) {
 282   return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
 283 }
 284 
 285 extern "C" intptr_t *_get_current_sp();  // in .il file
 286 
 287 address os::current_stack_pointer() {
 288   return (address)_get_current_sp();
 289 }
 290 
 291 extern "C" intptr_t *_get_current_fp();  // in .il file
 292 
 293 frame os::current_frame() {
 294   intptr_t* fp = _get_current_fp();  // it's inlined so want current fp

 295   frame myframe((intptr_t*)os::current_stack_pointer(),
 296                 (intptr_t*)fp,
 297                 CAST_FROM_FN_PTR(address, os::current_frame));
 298   if (os::is_first_C_frame(&myframe)) {


 299     // stack is not walkable
 300     frame ret; // This will be a null useless frame
 301     return ret;
 302   } else {
 303     return os::get_sender_for_C_frame(&myframe);

 304   }
 305 }
 306 
 307 #ifndef AMD64
 308 
 309 // Detecting SSE support by OS
 310 // From solaris_i486.s
 311 extern "C" bool sse_check();
 312 extern "C" bool sse_unavailable();
 313 
 314 enum { SSE_UNKNOWN, SSE_NOT_SUPPORTED, SSE_SUPPORTED};
 315 static int sse_status = SSE_UNKNOWN;
 316 
 317 
 318 static void  check_for_sse_support() {
 319   if (!VM_Version::supports_sse()) {
 320     sse_status = SSE_NOT_SUPPORTED;
 321     return;
 322   }
 323   // looking for _sse_hw in libc.so, if it does not exist or




 275     }
 276   }
 277   assert(fr->is_java_frame(), "Safety check");
 278   return true;
 279 }
 280 
 281 frame os::get_sender_for_C_frame(frame* fr) {
 282   return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
 283 }
 284 
 285 extern "C" intptr_t *_get_current_sp();  // in .il file
 286 
 287 address os::current_stack_pointer() {
 288   return (address)_get_current_sp();
 289 }
 290 
 291 extern "C" intptr_t *_get_current_fp();  // in .il file
 292 
 293 frame os::current_frame() {
 294   intptr_t* fp = _get_current_fp();  // it's inlined so want current fp
 295   // fp is for os::current_frame. We want the fp for our caller.
 296   frame myframe((intptr_t*)os::current_stack_pointer(),
 297                 (intptr_t*)fp,
 298                 CAST_FROM_FN_PTR(address, os::current_frame));
 299   frame caller_frame = os::get_sender_for_C_frame(&myframe);
 300 
 301   if (os::is_first_C_frame(&caller_frame)) {
 302     // stack is not walkable
 303     frame ret; // This will be a null useless frame
 304     return ret;
 305   } else {
 306     // return frame for our caller's caller
 307     return os::get_sender_for_C_frame(&caller_frame);
 308   }
 309 }
 310 
 311 #ifndef AMD64
 312 
 313 // Detecting SSE support by OS
 314 // From solaris_i486.s
 315 extern "C" bool sse_check();
 316 extern "C" bool sse_unavailable();
 317 
 318 enum { SSE_UNKNOWN, SSE_NOT_SUPPORTED, SSE_SUPPORTED};
 319 static int sse_status = SSE_UNKNOWN;
 320 
 321 
 322 static void  check_for_sse_support() {
 323   if (!VM_Version::supports_sse()) {
 324     sse_status = SSE_NOT_SUPPORTED;
 325     return;
 326   }
 327   // looking for _sse_hw in libc.so, if it does not exist or


< prev index next >