# HG changeset patch # User Thomas Wuerthinger # Date 1304697242 -7200 # Node ID b1b58f9080449c20cb68de43e9d407a5ef74c740 # Parent 008adfd6d850a5e3ba0e8f83f208c086b1f58eb0 Deoptimize on implicit division by 0. diff -r 008adfd6d850 -r b1b58f908044 src/cpu/x86/vm/c1_Runtime1_x86.cpp --- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri May 06 17:47:17 2011 +0200 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri May 06 17:54:02 2011 +0200 @@ -1924,21 +1924,6 @@ break; } - case c1x_throw_div0_exception_id: { - __ push(rax); - __ push(rax); - // move saved fp to make space for the inserted return address - __ get_thread(rax); - __ movptr(rax, Address(rax, JavaThread::saved_exception_pc_offset())); - __ movptr(Address(rsp, HeapWordSize), rax); - __ pop(rax); - - { StubFrame f(sasm, "throw_div0_exception", dont_gc_arguments); - oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_div0_exception), false); - } - break; - } - case c1x_slow_subtype_check_id: { Label success; Label miss; diff -r 008adfd6d850 -r b1b58f908044 src/share/vm/c1/c1_Runtime1.hpp --- a/src/share/vm/c1/c1_Runtime1.hpp Fri May 06 17:47:17 2011 +0200 +++ b/src/share/vm/c1/c1_Runtime1.hpp Fri May 06 17:54:02 2011 +0200 @@ -72,7 +72,6 @@ stub(counter_overflow) \ stub(c1x_unwind_exception_call) \ stub(c1x_handle_exception) \ - stub(c1x_throw_div0_exception) \ stub(c1x_slow_subtype_check) \ stub(c1x_arithmetic_frem) \ stub(c1x_arithmetic_drem) \ diff -r 008adfd6d850 -r b1b58f908044 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Fri May 06 17:47:17 2011 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Fri May 06 17:54:02 2011 +0200 @@ -809,7 +809,7 @@ if (TraceSignals) { tty->print_cr("c1x implicit div0"); } - target_pc = Runtime1::entry_for(Runtime1::c1x_throw_div0_exception_id); + target_pc = deoptimization_continuation(thread, pc, nm); } else { target_pc = nm->continuation_for_implicit_exception(pc); }