< prev index next >

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

Print this page
rev 52430 : 8213199: GC abstraction for Assembler::needs_explicit_null_check()


 462           // pending. We want to dismiss that exception. From the win_32
 463           // side it also seems that if it really was the fist causing
 464           // the exception that we do the d2i by hand with different
 465           // rounding. Seems kind of weird.
 466           // NOTE: that we take the exception at the NEXT floating point instruction.
 467           assert(pc[0] == 0xDB, "not a FIST opcode");
 468           assert(pc[1] == 0x14, "not a FIST opcode");
 469           assert(pc[2] == 0x24, "not a FIST opcode");
 470           return true;
 471         } else if (op == 0xF7) {
 472           // IDIV
 473           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 474         } else {
 475           // TODO: handle more cases if we are using other x86 instructions
 476           //   that can generate SIGFPE signal on linux.
 477           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 478           fatal("please update this code.");
 479         }
 480 #endif // AMD64
 481       } else if (sig == SIGSEGV &&
 482                !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
 483           // Determination of interpreter/vtable stub/compiled code null exception
 484           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 485       }
 486     } else if (thread->thread_state() == _thread_in_vm &&
 487                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
 488                thread->doing_unsafe_access()) {
 489         address next_pc = Assembler::locate_next_instruction(pc);
 490         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 491     }
 492 
 493     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 494     // and the heap gets shrunk before the field access.
 495     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 496       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 497       if (addr != (address)-1) {
 498         stub = addr;
 499       }
 500     }
 501 
 502     // Check to see if we caught the safepoint code in the




 462           // pending. We want to dismiss that exception. From the win_32
 463           // side it also seems that if it really was the fist causing
 464           // the exception that we do the d2i by hand with different
 465           // rounding. Seems kind of weird.
 466           // NOTE: that we take the exception at the NEXT floating point instruction.
 467           assert(pc[0] == 0xDB, "not a FIST opcode");
 468           assert(pc[1] == 0x14, "not a FIST opcode");
 469           assert(pc[2] == 0x24, "not a FIST opcode");
 470           return true;
 471         } else if (op == 0xF7) {
 472           // IDIV
 473           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 474         } else {
 475           // TODO: handle more cases if we are using other x86 instructions
 476           //   that can generate SIGFPE signal on linux.
 477           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 478           fatal("please update this code.");
 479         }
 480 #endif // AMD64
 481       } else if (sig == SIGSEGV &&
 482                  MacroAssembler::uses_implicit_null_check(info->si_addr)) {
 483           // Determination of interpreter/vtable stub/compiled code null exception
 484           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 485       }
 486     } else if (thread->thread_state() == _thread_in_vm &&
 487                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
 488                thread->doing_unsafe_access()) {
 489         address next_pc = Assembler::locate_next_instruction(pc);
 490         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 491     }
 492 
 493     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 494     // and the heap gets shrunk before the field access.
 495     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 496       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 497       if (addr != (address)-1) {
 498         stub = addr;
 499       }
 500     }
 501 
 502     // Check to see if we caught the safepoint code in the


< prev index next >