3019 |
3019 |
3020 // Push interpreter frames in a loop |
3020 // Push interpreter frames in a loop |
3021 Label loop; |
3021 Label loop; |
3022 __ bind(loop); |
3022 __ bind(loop); |
3023 __ movptr(rbx, Address(rsi, 0)); // Load frame size |
3023 __ movptr(rbx, Address(rsi, 0)); // Load frame size |
3024 #ifdef CC_INTERP |
|
3025 __ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and |
|
3026 #ifdef ASSERT |
|
3027 __ push(0xDEADDEAD); // Make a recognizable pattern |
|
3028 __ push(0xDEADDEAD); |
|
3029 #else /* ASSERT */ |
|
3030 __ subptr(rsp, 2*wordSize); // skip the "static long no_param" |
|
3031 #endif /* ASSERT */ |
|
3032 #else |
|
3033 __ subptr(rbx, 2*wordSize); // We'll push pc and ebp by hand |
3024 __ subptr(rbx, 2*wordSize); // We'll push pc and ebp by hand |
3034 #endif // CC_INTERP |
|
3035 __ pushptr(Address(rcx, 0)); // Save return address |
3025 __ pushptr(Address(rcx, 0)); // Save return address |
3036 __ enter(); // Save old & set new ebp |
3026 __ enter(); // Save old & set new ebp |
3037 __ subptr(rsp, rbx); // Prolog |
3027 __ subptr(rsp, rbx); // Prolog |
3038 #ifdef CC_INTERP |
|
3039 __ movptr(Address(rbp, |
|
3040 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), |
|
3041 sender_sp); // Make it walkable |
|
3042 #else /* CC_INTERP */ |
|
3043 // This value is corrected by layout_activation_impl |
3028 // This value is corrected by layout_activation_impl |
3044 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); |
3029 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); |
3045 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), sender_sp); // Make it walkable |
3030 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), sender_sp); // Make it walkable |
3046 #endif /* CC_INTERP */ |
|
3047 __ mov(sender_sp, rsp); // Pass sender_sp to next frame |
3031 __ mov(sender_sp, rsp); // Pass sender_sp to next frame |
3048 __ addptr(rsi, wordSize); // Bump array pointer (sizes) |
3032 __ addptr(rsi, wordSize); // Bump array pointer (sizes) |
3049 __ addptr(rcx, wordSize); // Bump array pointer (pcs) |
3033 __ addptr(rcx, wordSize); // Bump array pointer (pcs) |
3050 __ decrementl(rdx); // Decrement counter |
3034 __ decrementl(rdx); // Decrement counter |
3051 __ jcc(Assembler::notZero, loop); |
3035 __ jcc(Assembler::notZero, loop); |
3240 __ movptr(rbx, Address(rsi, 0)); // Load frame size |
3224 __ movptr(rbx, Address(rsi, 0)); // Load frame size |
3241 __ subptr(rbx, 2 * wordSize); // We'll push pc and rbp by hand |
3225 __ subptr(rbx, 2 * wordSize); // We'll push pc and rbp by hand |
3242 __ pushptr(Address(rcx, 0)); // Save return address |
3226 __ pushptr(Address(rcx, 0)); // Save return address |
3243 __ enter(); // Save old & set new rbp |
3227 __ enter(); // Save old & set new rbp |
3244 __ subptr(rsp, rbx); // Prolog |
3228 __ subptr(rsp, rbx); // Prolog |
3245 #ifdef CC_INTERP |
|
3246 __ movptr(Address(rbp, |
|
3247 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), |
|
3248 sender_sp); // Make it walkable |
|
3249 #else // CC_INTERP |
|
3250 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), |
3229 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), |
3251 sender_sp); // Make it walkable |
3230 sender_sp); // Make it walkable |
3252 // This value is corrected by layout_activation_impl |
3231 // This value is corrected by layout_activation_impl |
3253 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); |
3232 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); |
3254 #endif // CC_INTERP |
|
3255 __ mov(sender_sp, rsp); // Pass sender_sp to next frame |
3233 __ mov(sender_sp, rsp); // Pass sender_sp to next frame |
3256 __ addptr(rsi, wordSize); // Bump array pointer (sizes) |
3234 __ addptr(rsi, wordSize); // Bump array pointer (sizes) |
3257 __ addptr(rcx, wordSize); // Bump array pointer (pcs) |
3235 __ addptr(rcx, wordSize); // Bump array pointer (pcs) |
3258 __ decrementl(rdx); // Decrement counter |
3236 __ decrementl(rdx); // Decrement counter |
3259 __ jcc(Assembler::notZero, loop); |
3237 __ jcc(Assembler::notZero, loop); |