changeset 2608:b1b58f908044

Deoptimize on implicit division by 0.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Fri, 06 May 2011 17:54:02 +0200
parents 008adfd6d850
children a57e051b33cd 2523de4d378e
files src/cpu/x86/vm/c1_Runtime1_x86.cpp src/share/vm/c1/c1_Runtime1.hpp src/share/vm/runtime/sharedRuntime.cpp
diffstat 3 files changed, 1 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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)          \
--- 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);
         }