src/cpu/sparc/vm/templateInterpreter_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Fri Apr 29 15:28:47 2011
--- new/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Fri Apr 29 15:28:47 2011
*** 1615,1653 ****
--- 1615,1639 ----
intptr_t* esp = monitors - 1 -
(tempcount * Interpreter::stackElementWords) -
popframe_extra_args;
int local_words = method->max_locals() * Interpreter::stackElementWords;
int parm_words = method->size_of_parameters() * Interpreter::stackElementWords;
NEEDS_CLEANUP;
intptr_t* locals;
if (caller->is_interpreted_frame()) {
// Can force the locals area to end up properly overlapping the top of the expression stack.
intptr_t* Lesp_ptr = caller->interpreter_frame_tos_address() - 1;
// Note that this computation means we replace size_of_parameters() values from the caller
// interpreter frame's expression stack with our argument locals
locals = Lesp_ptr + parm_words;
int delta = local_words - parm_words;
int computed_sp_adjustment = (delta > 0) ? round_to(delta, WordsPerLong) : 0;
*interpreter_frame->register_addr(I5_savedSP) = (intptr_t) (fp + computed_sp_adjustment) - STACK_BIAS;
} else {
assert(caller->is_compiled_frame() || caller->is_entry_frame(), "only possible cases");
// Don't have Lesp available; lay out locals block in the caller
// adjacent to the register window save area.
//
// Compiled frames do not allocate a varargs area which is why this if
// statement is needed.
//
if (caller->is_compiled_frame()) {
+ // Compiled frames do not allocate a varargs area so place them
+ // next to the register save area.
locals = fp + frame::register_save_words + local_words - 1;
} else {
locals = fp + frame::memory_parameter_word_sp_offset + local_words - 1;
}
if (!caller->is_entry_frame()) {
// Caller wants his own SP back
int caller_frame_size = caller->cb()->frame_size();
*interpreter_frame->register_addr(I5_savedSP) = (intptr_t)(caller->fp() - caller_frame_size) - STACK_BIAS;
+ } else {
+ assert(caller->is_interpreted_frame() || caller->is_entry_frame(), "only possible cases");
+ // The entry and interpreter frames are laid out like normal C
+ // frames so place the locals adjacent to the varargs area.
+ locals = fp + frame::memory_parameter_word_sp_offset + local_words - 1;
+ if (caller->is_interpreted_frame()) {
+ *interpreter_frame->register_addr(I5_savedSP) = (intptr_t) (fp + rounded_cls) - STACK_BIAS;
}
}
if (TraceDeoptimization) {
if (caller->is_entry_frame()) {
// make sure I5_savedSP and the entry frames notion of saved SP
src/cpu/sparc/vm/templateInterpreter_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File