# HG changeset patch # User Thomas Wuerthinger # Date 1330127578 -3600 # Node ID e29339f342deabf9f329fc8a02160e37f694a27f # Parent 6336b144e391985aed7b60eae785d89d8a20587d Removed HandleException runtime call and associated C++ code (unused). diff -r 6336b144e391 -r e29339f342de graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java --- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java Sat Feb 25 00:49:04 2012 +0100 +++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java Sat Feb 25 00:52:58 2012 +0100 @@ -33,7 +33,6 @@ UnwindException(Void, Object), Deoptimize(Void), RegisterFinalizer(Void, Object), - HandleException(Void, Object), SetDeoptInfo(Void, Object), CreateNullPointerException(Object), CreateOutOfBoundsException(Object, Int), diff -r 6336b144e391 -r e29339f342de src/cpu/x86/vm/c1_Runtime1_x86.cpp --- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp Sat Feb 25 00:49:04 2012 +0100 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp Sat Feb 25 00:52:58 2012 +0100 @@ -773,74 +773,6 @@ return oop_maps; } -void Runtime1::graal_generate_handle_exception(StubAssembler *sasm, OopMapSet* oop_maps, OopMap* oop_map) { - NOT_LP64(fatal("64 bit only")); - // incoming parameters - const Register exception_oop = j_rarg0; - // other registers used in this stub - const Register exception_pc = j_rarg1; - const Register thread = r15_thread; - - __ block_comment("graal_generate_handle_exception"); - - // verify that rax, contains a valid exception - __ verify_not_null_oop(exception_oop); - -#ifdef ASSERT - // check that fields in JavaThread for exception oop and issuing pc are - // empty before writing to them - Label oop_empty; - __ cmpptr(Address(thread, JavaThread::exception_oop_offset()), (int32_t) NULL_WORD); - __ jcc(Assembler::equal, oop_empty); - __ stop("exception oop already set"); - __ bind(oop_empty); - - Label pc_empty; - __ cmpptr(Address(thread, JavaThread::exception_pc_offset()), 0); - __ jcc(Assembler::equal, pc_empty); - __ stop("exception pc already set"); - __ bind(pc_empty); -#endif - - // save exception oop and issuing pc into JavaThread - // (exception handler will load it from here) - __ movptr(Address(thread, JavaThread::exception_oop_offset()), exception_oop); - __ movptr(exception_pc, Address(rbp, 1*BytesPerWord)); - __ movptr(Address(thread, JavaThread::exception_pc_offset()), exception_pc); - - // compute the exception handler. - // the exception oop and the throwing pc are read from the fields in JavaThread - int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, exception_handler_for_pc)); - oop_maps->add_gc_map(call_offset, oop_map); - - // rax,: handler address - // will be the deopt blob if nmethod was deoptimized while we looked up - // handler regardless of whether handler existed in the nmethod. - - // only rax, is valid at this time, all other registers have been destroyed by the runtime call - __ invalidate_registers(false, true, true, true, true, true); - -#ifdef ASSERT - // Do we have an exception handler in the nmethod? - Label done; - __ testptr(rax, rax); - __ jcc(Assembler::notZero, done); - __ stop("no handler found"); - __ bind(done); -#endif - - // exception handler found - // patch the return address -> the stub will directly return to the exception handler - __ movptr(Address(rbp, 1*BytesPerWord), rax); - - // restore registers - restore_live_registers(sasm, false); - - // return to exception handler - __ leave(); - __ ret(0); -} - void Runtime1::generate_unwind_exception(StubAssembler *sasm) { // incoming parameters @@ -1986,14 +1918,6 @@ break; } - case graal_handle_exception_id: { - StubFrame f(sasm, "graal_handle_exception", dont_gc_arguments); - oop_maps = new OopMapSet(); - OopMap* oop_map = save_live_registers(sasm, 1, false); - graal_generate_handle_exception(sasm, oop_maps, oop_map); - break; - } - case graal_slow_subtype_check_id: { Label success; Label miss; diff -r 6336b144e391 -r e29339f342de src/share/vm/c1/c1_Runtime1.hpp --- a/src/share/vm/c1/c1_Runtime1.hpp Sat Feb 25 00:49:04 2012 +0100 +++ b/src/share/vm/c1/c1_Runtime1.hpp Sat Feb 25 00:52:58 2012 +0100 @@ -137,7 +137,6 @@ static OopMapSet* generate_exception_throw(StubAssembler* sasm, address target, bool has_argument); static OopMapSet* generate_handle_exception(StubID id, StubAssembler* sasm); static void generate_unwind_exception(StubAssembler *sasm); - static void graal_generate_handle_exception(StubAssembler *sasm, OopMapSet* oop_maps, OopMap* oop_map); static OopMapSet* generate_patching(StubAssembler* sasm, address target); static OopMapSet* generate_stub_call(StubAssembler* sasm, Register result, address entry, diff -r 6336b144e391 -r e29339f342de src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Sat Feb 25 00:49:04 2012 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Sat Feb 25 00:52:58 2012 +0100 @@ -537,9 +537,6 @@ } else if (runtime_call == CiRuntimeCall::UnwindException()) { target_addr = Runtime1::entry_for(Runtime1::graal_unwind_exception_call_id); TRACE_graal_3("CiRuntimeCall::UnwindException()"); - } else if (runtime_call == CiRuntimeCall::HandleException()) { - target_addr = Runtime1::entry_for(Runtime1::graal_handle_exception_id); - TRACE_graal_3("CiRuntimeCall::HandleException()"); } else if (runtime_call == CiRuntimeCall::SetDeoptInfo()) { target_addr = Runtime1::entry_for(Runtime1::graal_set_deopt_info_id); TRACE_graal_3("CiRuntimeCall::SetDeoptInfo()");