hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp
changeset 46458 3c12af929e7d
parent 46386 742f8b16d00c
parent 44738 11431bbc9549
--- a/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp	Fri May 12 11:41:05 2017 +0200
+++ b/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp	Fri May 12 13:14:25 2017 -0700
@@ -979,12 +979,19 @@
   obj.load_item();
 
   // info for exceptions
-  CodeEmitInfo* info_for_exception = state_for (x);
+  CodeEmitInfo* info_for_exception =
+      (x->needs_exception_state() ? state_for(x) :
+                                    state_for(x, x->state_before(), true /*ignore_xhandler*/));
 
   CodeStub* stub;
   if (x->is_incompatible_class_change_check()) {
     assert(patching_info == NULL, "can't patch this");
     stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
+  } else if (x->is_invokespecial_receiver_check()) {
+    assert(patching_info == NULL, "can't patch this");
+    stub = new DeoptimizeStub(info_for_exception,
+                              Deoptimization::Reason_class_check,
+                              Deoptimization::Action_none);
   } else {
     stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
   }