Mon, 17 Aug 2009 09:48:02 -0700
6829127: Deoptimization Failure on Specjvm98 _227_mtrt with -XX:+DeoptimizeALot since Hs11 b01
Summary: Make sure the control word is correct in deopt_blob after restore_result_registers
Reviewed-by: kvn, never
src/cpu/x86/vm/sharedRuntime_x86_32.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Fri Aug 14 22:11:18 2009 -0700 1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Mon Aug 17 09:48:02 2009 -0700 1.3 @@ -2381,7 +2381,7 @@ 1.4 1.5 // Save everything in sight. 1.6 1.7 - map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 1.8 + map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false); 1.9 // Normal deoptimization 1.10 __ push(Deoptimization::Unpack_deopt); 1.11 __ jmp(cont); 1.12 @@ -2392,7 +2392,7 @@ 1.13 // return address is the pc describes what bci to do re-execute at 1.14 1.15 // No need to update map as each call to save_live_registers will produce identical oopmap 1.16 - (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 1.17 + (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false); 1.18 1.19 __ push(Deoptimization::Unpack_reexecute); 1.20 __ jmp(cont); 1.21 @@ -2428,7 +2428,7 @@ 1.22 // Save everything in sight. 1.23 1.24 // No need to update map as each call to save_live_registers will produce identical oopmap 1.25 - (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 1.26 + (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false); 1.27 1.28 // Now it is safe to overwrite any register 1.29 1.30 @@ -2515,6 +2515,11 @@ 1.31 1.32 RegisterSaver::restore_result_registers(masm); 1.33 1.34 + // Non standard control word may be leaked out through a safepoint blob, and we can 1.35 + // deopt at a poll point with the non standard control word. However, we should make 1.36 + // sure the control word is correct after restore_result_registers. 1.37 + __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std())); 1.38 + 1.39 // All of the register save area has been popped of the stack. Only the 1.40 // return address remains. 1.41