src/cpu/x86/vm/cppInterpreter_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot-dvm Cdiff src/cpu/x86/vm/cppInterpreter_x86.cpp
src/cpu/x86/vm/cppInterpreter_x86.cpp
Print this page
rev 522 : [mq]: meth.patch
*** 511,524 ****
__ movptr(STATE(_stack), rsp); // set current expression stack tos
// compute full expression stack limit
const Address size_of_stack (rbx, methodOopDesc::max_stack_offset());
__ load_unsigned_word(rdx, size_of_stack); // get size of expression stack in words
__ negptr(rdx); // so we can subtract in next step
// Allocate expression stack
! __ lea(rsp, Address(rsp, rdx, Address::times_ptr));
__ movptr(STATE(_stack_limit), rsp);
}
#ifdef _LP64
// Make sure stack is properly aligned and sized for the abi
--- 511,525 ----
__ movptr(STATE(_stack), rsp); // set current expression stack tos
// compute full expression stack limit
const Address size_of_stack (rbx, methodOopDesc::max_stack_offset());
+ const int extra_stack = methodOopDesc::extra_stack() * Interpreter::stackElementSize;
__ load_unsigned_word(rdx, size_of_stack); // get size of expression stack in words
__ negptr(rdx); // so we can subtract in next step
// Allocate expression stack
! __ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack));
__ movptr(STATE(_stack_limit), rsp);
}
#ifdef _LP64
// Make sure stack is properly aligned and sized for the abi
*** 657,668 ****
// locals + overhead, in bytes
const Address size_of_stack (rbx, methodOopDesc::max_stack_offset());
// Always give one monitor to allow us to start interp if sync method.
// Any additional monitors need a check when moving the expression stack
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
__ load_unsigned_word(rax, size_of_stack); // get size of expression stack in words
! __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor));
__ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
#ifdef ASSERT
Label stack_base_okay, stack_size_okay;
// verify that thread stack base is non-zero
--- 658,670 ----
// locals + overhead, in bytes
const Address size_of_stack (rbx, methodOopDesc::max_stack_offset());
// Always give one monitor to allow us to start interp if sync method.
// Any additional monitors need a check when moving the expression stack
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
+ const int extra_stack = methodOopDesc::extra_stack() * Interpreter::stackElementSize;
__ load_unsigned_word(rax, size_of_stack); // get size of expression stack in words
! __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor));
__ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
#ifdef ASSERT
Label stack_base_okay, stack_size_okay;
// verify that thread stack base is non-zero
*** 2183,2192 ****
--- 2185,2195 ----
case Interpreter::native : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(false); break;
case Interpreter::native_synchronized : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(true); break;
case Interpreter::empty : entry_point = ((InterpreterGenerator*)this)->generate_empty_entry(); break;
case Interpreter::accessor : entry_point = ((InterpreterGenerator*)this)->generate_accessor_entry(); break;
case Interpreter::abstract : entry_point = ((InterpreterGenerator*)this)->generate_abstract_entry(); break;
+ case Interpreter::method_handle : entry_point = ((InterpreterGenerator*)this)->generate_method_handle_entry(); break;
case Interpreter::java_lang_math_sin : // fall thru
case Interpreter::java_lang_math_cos : // fall thru
case Interpreter::java_lang_math_tan : // fall thru
case Interpreter::java_lang_math_abs : // fall thru
*** 2222,2232 ****
// address, saved rbp and 2 words for a "static long no_params() method" issue.
const int overhead_size = sizeof(BytecodeInterpreter)/wordSize +
( frame::sender_sp_offset - frame::link_offset) + 2;
! const int method_stack = (method->max_locals() + method->max_stack()) *
Interpreter::stackElementWords();
return overhead_size + method_stack + stub_code;
}
// returns the activation size.
--- 2225,2236 ----
// address, saved rbp and 2 words for a "static long no_params() method" issue.
const int overhead_size = sizeof(BytecodeInterpreter)/wordSize +
( frame::sender_sp_offset - frame::link_offset) + 2;
! const int extra_stack = methodOopDesc::extra_stack();
! const int method_stack = (method->max_locals() + method->max_stack() + extra_stack) *
Interpreter::stackElementWords();
return overhead_size + method_stack + stub_code;
}
// returns the activation size.
*** 2287,2297 ****
to_fill->_oop_temp = NULL;
to_fill->_stack_base = stack_base;
// Need +1 here because stack_base points to the word just above the first expr stack entry
// and stack_limit is supposed to point to the word just below the last expr stack entry.
// See generate_compute_interpreter_state.
! to_fill->_stack_limit = stack_base - (method->max_stack() + 1);
to_fill->_monitor_base = (BasicObjectLock*) monitor_base;
to_fill->_self_link = to_fill;
assert(stack >= to_fill->_stack_limit && stack < to_fill->_stack_base,
"Stack top out of range");
--- 2291,2302 ----
to_fill->_oop_temp = NULL;
to_fill->_stack_base = stack_base;
// Need +1 here because stack_base points to the word just above the first expr stack entry
// and stack_limit is supposed to point to the word just below the last expr stack entry.
// See generate_compute_interpreter_state.
! int extra_stack = methodOopDesc::extra_stack();
! to_fill->_stack_limit = stack_base - (method->max_stack() + extra_stack + 1);
to_fill->_monitor_base = (BasicObjectLock*) monitor_base;
to_fill->_self_link = to_fill;
assert(stack >= to_fill->_stack_limit && stack < to_fill->_stack_base,
"Stack top out of range");
*** 2333,2343 ****
// First calculate the frame size without any java expression stack
int short_frame_size = size_activation_helper(extra_locals_size,
monitor_size);
// Now with full size expression stack
! int full_frame_size = short_frame_size + method->max_stack() * BytesPerWord;
// and now with only live portion of the expression stack
short_frame_size = short_frame_size + tempcount * BytesPerWord;
// the size the activation is right now. Only top frame is full size
--- 2338,2349 ----
// First calculate the frame size without any java expression stack
int short_frame_size = size_activation_helper(extra_locals_size,
monitor_size);
// Now with full size expression stack
! int extra_stack = methodOopDesc::extra_stack();
! int full_frame_size = short_frame_size + (method->max_stack() + extra_stack) * BytesPerWord;
// and now with only live portion of the expression stack
short_frame_size = short_frame_size + tempcount * BytesPerWord;
// the size the activation is right now. Only top frame is full size
src/cpu/x86/vm/cppInterpreter_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File