# HG changeset patch # User Christian Haeubl # Date 1332269121 25200 # Node ID 837a304d0ca8c25864dd3db035aad22641e87b37 # Parent 3d0556d10a2bfc6ad73e6b39448013cb362143c9 C1 bugfix, fixed C1 compilation errors diff -r 3d0556d10a2b -r 837a304d0ca8 src/cpu/x86/vm/c1_Runtime1_x86.cpp --- 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 diff -r 3d0556d10a2b -r 837a304d0ca8 src/share/vm/runtime/sharedRuntime.cpp --- 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"); diff -r 3d0556d10a2b -r 837a304d0ca8 src/share/vm/runtime/sharedRuntime.hpp --- 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);