mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8009761: Deoptimization on sparc doesn't set Llast_SP correctly in the interpreter frames it creates
Deoptimization doesn't set up callee frames so that they restore caller frames correctly. Reviewed-by: kvn
This commit is contained in:
parent
5d0afe6210
commit
05b1c69fc0
11 changed files with 295 additions and 14 deletions
|
@ -1581,7 +1581,8 @@ int AbstractInterpreter::layout_activation(Method* method,
|
|||
int callee_local_count,
|
||||
frame* caller,
|
||||
frame* interpreter_frame,
|
||||
bool is_top_frame) {
|
||||
bool is_top_frame,
|
||||
bool is_bottom_frame) {
|
||||
// Note: This calculation must exactly parallel the frame setup
|
||||
// in InterpreterGenerator::generate_fixed_frame.
|
||||
// If f!=NULL, set up the following variables:
|
||||
|
@ -1664,6 +1665,15 @@ int AbstractInterpreter::layout_activation(Method* method,
|
|||
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;
|
||||
if (!is_bottom_frame) {
|
||||
// Llast_SP is set below for the current frame to SP (with the
|
||||
// extra space for the callee's locals). Here we adjust
|
||||
// Llast_SP for the caller's frame, removing the extra space
|
||||
// for the current method's locals.
|
||||
*caller->register_addr(Llast_SP) = *interpreter_frame->register_addr(I5_savedSP);
|
||||
} else {
|
||||
assert(*caller->register_addr(Llast_SP) >= *interpreter_frame->register_addr(I5_savedSP), "strange Llast_SP");
|
||||
}
|
||||
} 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue