2937 // record the original sp so that we can save it in the skeletal 2938 // interpreter frame and the stack walking of interpreter_sender 2939 // will get the unextended sp value and not the "real" sp value. 2940 2941 const Register sender_sp = r8; 2942 2943 __ mov(sender_sp, rsp); 2944 __ movl(rbx, Address(rdi, 2945 Deoptimization::UnrollBlock:: 2946 caller_adjustment_offset_in_bytes())); // (int) 2947 __ subptr(rsp, rbx); 2948 2949 // Push interpreter frames in a loop 2950 Label loop; 2951 __ bind(loop); 2952 __ movptr(rbx, Address(rsi, 0)); // Load frame size 2953 __ subptr(rbx, 2 * wordSize); // We'll push pc and rbp by hand 2954 __ pushptr(Address(rcx, 0)); // Save return address 2955 __ enter(); // Save old & set new rbp 2956 __ subptr(rsp, rbx); // Prolog 2957 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), 2958 sender_sp); // Make it walkable 2959 // This value is corrected by layout_activation_impl 2960 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); 2961 __ mov(sender_sp, rsp); // Pass sender_sp to next frame 2962 __ addptr(rsi, wordSize); // Bump array pointer (sizes) 2963 __ addptr(rcx, wordSize); // Bump array pointer (pcs) 2964 __ decrementl(rdx); // Decrement counter 2965 __ jcc(Assembler::notZero, loop); 2966 __ pushptr(Address(rcx, 0)); // Save final return address 2967 2968 // Re-push self-frame 2969 __ enter(); // Save old & set new rbp 2970 __ subptr(rsp, (SimpleRuntimeFrame::framesize - 4) << LogBytesPerInt); 2971 // Prolog 2972 2973 // Use rbp because the frames look interpreted now 2974 __ set_last_Java_frame(noreg, rbp, NULL); 2975 2976 // Call C code. Need thread but NOT official VM entry 2977 // crud. We cannot block on this call, no GC can happen. Call should 2978 // restore return values to their stack-slots with the new SP. 2979 // Thread is in rdi already. 2980 // | 2937 // record the original sp so that we can save it in the skeletal 2938 // interpreter frame and the stack walking of interpreter_sender 2939 // will get the unextended sp value and not the "real" sp value. 2940 2941 const Register sender_sp = r8; 2942 2943 __ mov(sender_sp, rsp); 2944 __ movl(rbx, Address(rdi, 2945 Deoptimization::UnrollBlock:: 2946 caller_adjustment_offset_in_bytes())); // (int) 2947 __ subptr(rsp, rbx); 2948 2949 // Push interpreter frames in a loop 2950 Label loop; 2951 __ bind(loop); 2952 __ movptr(rbx, Address(rsi, 0)); // Load frame size 2953 __ subptr(rbx, 2 * wordSize); // We'll push pc and rbp by hand 2954 __ pushptr(Address(rcx, 0)); // Save return address 2955 __ enter(); // Save old & set new rbp 2956 __ subptr(rsp, rbx); // Prolog 2957 #ifdef CC_INTERP 2958 __ movptr(Address(rbp, 2959 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), 2960 sender_sp); // Make it walkable 2961 #else // CC_INTERP 2962 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), 2963 sender_sp); // Make it walkable 2964 // This value is corrected by layout_activation_impl 2965 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); 2966 #endif // CC_INTERP 2967 __ mov(sender_sp, rsp); // Pass sender_sp to next frame 2968 __ addptr(rsi, wordSize); // Bump array pointer (sizes) 2969 __ addptr(rcx, wordSize); // Bump array pointer (pcs) 2970 __ decrementl(rdx); // Decrement counter 2971 __ jcc(Assembler::notZero, loop); 2972 __ pushptr(Address(rcx, 0)); // Save final return address 2973 2974 // Re-push self-frame 2975 __ enter(); // Save old & set new rbp 2976 __ subptr(rsp, (SimpleRuntimeFrame::framesize - 4) << LogBytesPerInt); 2977 // Prolog 2978 2979 // Use rbp because the frames look interpreted now 2980 __ set_last_Java_frame(noreg, rbp, NULL); 2981 2982 // Call C code. Need thread but NOT official VM entry 2983 // crud. We cannot block on this call, no GC can happen. Call should 2984 // restore return values to their stack-slots with the new SP. 2985 // Thread is in rdi already. 2986 // |