comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 4675:c2384f5b2e6e

Small changes to the deopt stub.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 22 Feb 2012 14:07:10 +0100
parents 9ae5048b9153
children 74c0b866fe8d
comparison
equal deleted inserted replaced
4664:60a8f52c0be0 4675:c2384f5b2e6e
2607 // It will be patched later with the throwing pc. The correct value is not 2607 // It will be patched later with the throwing pc. The correct value is not
2608 // available now because loading it from memory would destroy registers. 2608 // available now because loading it from memory would destroy registers.
2609 __ push(0); 2609 __ push(0);
2610 2610
2611 // Save everything in sight. 2611 // Save everything in sight.
2612 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); 2612 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
2613 2613
2614 // Now it is safe to overwrite any register 2614 // Now it is safe to overwrite any register
2615 2615
2616 // Deopt during an exception. Save exec mode for unpack_frames. 2616 // Deopt during an exception. Save exec mode for unpack_frames.
2617 __ movl(r14, Deoptimization::Unpack_exception); // callee-saved 2617 __ movl(r14, Deoptimization::Unpack_exception); // callee-saved
2647 int uncommon_trap_offset = __ pc() - start; 2647 int uncommon_trap_offset = __ pc() - start;
2648 2648
2649 // Warning: Duplicate code 2649 // Warning: Duplicate code
2650 2650
2651 // Save everything in sight. 2651 // Save everything in sight.
2652 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); 2652 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
2653 2653
2654 // Normal deoptimization 2654 // Normal deoptimization
2655 2655
2656 2656
2657 // fetch_unroll_info needs to call last_java_frame() 2657 // fetch_unroll_info needs to call last_java_frame()
2660 2660
2661 // __ movl(c_rarg1, (int32_t)Deoptimization::Unpack_reexecute); 2661 // __ movl(c_rarg1, (int32_t)Deoptimization::Unpack_reexecute);
2662 // __ movl(r14, c_rarg1); // save into r14 for later call to unpack_frames 2662 // __ movl(r14, c_rarg1); // save into r14 for later call to unpack_frames
2663 2663
2664 assert(r10 == rscratch1, "scratch register should be r10"); 2664 assert(r10 == rscratch1, "scratch register should be r10");
2665 __ movptr(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes())); 2665 __ movl(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes()));
2666 __ orq(c_rarg1, ~(int32_t)Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none)); 2666 __ orq(c_rarg1, ~(int32_t)Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none));
2667 __ notq(c_rarg1); 2667 __ notq(c_rarg1);
2668 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute); 2668 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute);
2669 __ mov(c_rarg0, r15_thread); 2669 __ mov(c_rarg0, r15_thread);
2670 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); 2670 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
2743 // Only register save data is on the stack. 2743 // Only register save data is on the stack.
2744 // Now restore the result registers. Everything else is either dead 2744 // Now restore the result registers. Everything else is either dead
2745 // or captured in the vframeArray. 2745 // or captured in the vframeArray.
2746 RegisterSaver::restore_result_registers(masm); 2746 RegisterSaver::restore_result_registers(masm);
2747 2747
2748 // All of the register save area has been poppeset_jmp_uncommon_trap_offsetd of the stack. Only the 2748 // All of the register save area has been popped of the stack. Only the
2749 // return address remains. 2749 // return address remains.
2750 2750
2751 // Pop all the frames we must move/replace. 2751 // Pop all the frames we must move/replace.
2752 // 2752 //
2753 // Frame picture (youngest to oldest) 2753 // Frame picture (youngest to oldest)