# HG changeset patch # User Ao Qi # Date 1290744058 -28800 # Node ID 9fdc8715b0a26f1d0091b478cbe88bd2b490914b # Parent ab0d284dc3130644a3381077b3065efd938d9764 Fix the deoptimization bug. Original PC of the deopt_frame may not be always in (fp - 1). Therefore, set RA to the deop_pc, which is the entry address of deopt_handler, and the frame::frame will handle it. diff -r ab0d284dc313 -r 9fdc8715b0a2 hotspot/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp --- a/hotspot/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp Thu Nov 18 16:19:42 2010 +0800 +++ b/hotspot/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp Fri Nov 26 12:00:58 2010 +0800 @@ -433,7 +433,7 @@ compilation()->offsets()->set_value(CodeOffsets::Deopt, code_offset()); - __ jmp(SharedRuntime::deopt_blob()->unpack()); + __ call(SharedRuntime::deopt_blob()->unpack()); __ delayed()->nop(); assert(code_offset() - offset <= deopt_handler_size, "overflow"); diff -r ab0d284dc313 -r 9fdc8715b0a2 hotspot/src/cpu/mips/vm/sharedRuntime_mips.cpp --- a/hotspot/src/cpu/mips/vm/sharedRuntime_mips.cpp Thu Nov 18 16:19:42 2010 +0800 +++ b/hotspot/src/cpu/mips/vm/sharedRuntime_mips.cpp Fri Nov 26 12:00:58 2010 +0800 @@ -3233,7 +3233,7 @@ // Prolog for non exception case! // Correct the return address we were given. //FIXME, return address is on the tos or Ra? - __ lw(RA, FP, (-1) * wordSize); + __ addi(RA, RA, - (NativeCall::return_address_offset)); // Save everything in sight. map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); // Normal deoptimization