comparison src/cpu/x86/vm/sharedRuntime_x86_32.cpp @ 926:c8e2135f7e30

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
author cfang
date Mon, 17 Aug 2009 09:48:02 -0700
parents 7bb995fbd3c0
children cf0685d550f1
comparison
equal deleted inserted replaced
925:7c14587118b3 926:c8e2135f7e30
2379 2379
2380 // Prolog for non exception case! 2380 // Prolog for non exception case!
2381 2381
2382 // Save everything in sight. 2382 // Save everything in sight.
2383 2383
2384 map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 2384 map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
2385 // Normal deoptimization 2385 // Normal deoptimization
2386 __ push(Deoptimization::Unpack_deopt); 2386 __ push(Deoptimization::Unpack_deopt);
2387 __ jmp(cont); 2387 __ jmp(cont);
2388 2388
2389 int reexecute_offset = __ pc() - start; 2389 int reexecute_offset = __ pc() - start;
2390 2390
2391 // Reexecute case 2391 // Reexecute case
2392 // return address is the pc describes what bci to do re-execute at 2392 // return address is the pc describes what bci to do re-execute at
2393 2393
2394 // No need to update map as each call to save_live_registers will produce identical oopmap 2394 // No need to update map as each call to save_live_registers will produce identical oopmap
2395 (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 2395 (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
2396 2396
2397 __ push(Deoptimization::Unpack_reexecute); 2397 __ push(Deoptimization::Unpack_reexecute);
2398 __ jmp(cont); 2398 __ jmp(cont);
2399 2399
2400 int exception_offset = __ pc() - start; 2400 int exception_offset = __ pc() - start;
2426 __ push(0); 2426 __ push(0);
2427 2427
2428 // Save everything in sight. 2428 // Save everything in sight.
2429 2429
2430 // No need to update map as each call to save_live_registers will produce identical oopmap 2430 // No need to update map as each call to save_live_registers will produce identical oopmap
2431 (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 2431 (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
2432 2432
2433 // Now it is safe to overwrite any register 2433 // Now it is safe to overwrite any register
2434 2434
2435 // store the correct deoptimization type 2435 // store the correct deoptimization type
2436 __ push(Deoptimization::Unpack_exception); 2436 __ push(Deoptimization::Unpack_exception);
2512 // Stack is back to only having register save data on the stack. 2512 // Stack is back to only having register save data on the stack.
2513 // Now restore the result registers. Everything else is either dead or captured 2513 // Now restore the result registers. Everything else is either dead or captured
2514 // in the vframeArray. 2514 // in the vframeArray.
2515 2515
2516 RegisterSaver::restore_result_registers(masm); 2516 RegisterSaver::restore_result_registers(masm);
2517
2518 // Non standard control word may be leaked out through a safepoint blob, and we can
2519 // deopt at a poll point with the non standard control word. However, we should make
2520 // sure the control word is correct after restore_result_registers.
2521 __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
2517 2522
2518 // All of the register save area has been popped of the stack. Only the 2523 // All of the register save area has been popped of the stack. Only the
2519 // return address remains. 2524 // return address remains.
2520 2525
2521 // Pop all the frames we must move/replace. 2526 // Pop all the frames we must move/replace.