changeset 5124:837a304d0ca8

C1 bugfix, fixed C1 compilation errors
author Christian Haeubl <christian.haeubl@oracle.com>
date Tue, 20 Mar 2012 11:45:21 -0700
parents 3d0556d10a2b
children 4a1894e1cfc7
files src/cpu/x86/vm/c1_Runtime1_x86.cpp src/share/vm/runtime/sharedRuntime.cpp src/share/vm/runtime/sharedRuntime.hpp
diffstat 3 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Tue Mar 20 10:33:39 2012 -0700
+++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Tue Mar 20 11:45:21 2012 -0700
@@ -97,12 +97,23 @@
     if (oop_result2->is_valid()) {
       movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD);
     }
+#ifdef GRAAL
     // (thomaswue) Deoptimize in case of an exception.
     restore_live_registers(this, false);
     movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD);
     leave();
     movl(rscratch1, Deoptimization::make_trap_request(Deoptimization::Reason_constraint, Deoptimization::Action_reinterpret));
     jump(RuntimeAddress(SharedRuntime::deopt_blob()->uncommon_trap()));
+#else
+    if (frame_size() == no_frame_size) {
+      leave();
+      jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
+    } else if (_stub_id == Runtime1::forward_exception_id) {
+      should_not_reach_here();
+    } else {
+      jump(RuntimeAddress(Runtime1::entry_for(Runtime1::forward_exception_id)));
+    }
+#endif
     bind(L);
   }
   // get oop results if there are any and reset the values in the thread
--- a/src/share/vm/runtime/sharedRuntime.cpp	Tue Mar 20 10:33:39 2012 -0700
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Tue Mar 20 11:45:21 2012 -0700
@@ -789,6 +789,7 @@
   throw_and_post_jvmti_exception(thread, exception);
 JRT_END
 
+#ifdef GRAAL
 address SharedRuntime::deoptimize_for_implicit_exception(JavaThread* thread, address pc, nmethod* nm, int deopt_reason) {
   assert(deopt_reason > Deoptimization::Reason_none && deopt_reason < Deoptimization::Reason_LIMIT, "invalid deopt reason");
   if (TraceSignals) {
@@ -798,6 +799,7 @@
   thread->_ScratchB = Deoptimization::make_trap_request((Deoptimization::DeoptReason)deopt_reason, Deoptimization::Action_reinterpret);
   return (SharedRuntime::deopt_blob()->implicit_exception_uncommon_trap());
 }
+#endif
 
 JRT_ENTRY(void, SharedRuntime::throw_WrongMethodTypeException(JavaThread* thread, oopDesc* required, oopDesc* actual))
   assert(thread == JavaThread::current() && required->is_oop() && actual->is_oop(), "bad args");
--- a/src/share/vm/runtime/sharedRuntime.hpp	Tue Mar 20 10:33:39 2012 -0700
+++ b/src/share/vm/runtime/sharedRuntime.hpp	Tue Mar 20 11:45:21 2012 -0700
@@ -187,11 +187,13 @@
   static void    throw_NullPointerException(JavaThread* thread);
   static void    throw_NullPointerException_at_call(JavaThread* thread);
   static void    throw_StackOverflowError(JavaThread* thread);
-  static address deoptimize_for_implicit_exception(JavaThread* thread, address pc, nmethod* nm, int deopt_reason);
   static void    throw_WrongMethodTypeException(JavaThread* thread, oopDesc* required, oopDesc* actual);
   static address continuation_for_implicit_exception(JavaThread* thread,
                                                      address faulting_pc,
                                                      ImplicitExceptionKind exception_kind);
+#ifdef GRAAL
+  static address deoptimize_for_implicit_exception(JavaThread* thread, address pc, nmethod* nm, int deopt_reason);
+#endif
 
   // Shared stub locations
   static address get_poll_stub(address pc);