--- old/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp 2018-09-17 10:29:27.487712677 -0400 +++ new/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp 2018-09-17 10:29:26.852675586 -0400 @@ -38,19 +38,6 @@ int AbstractInterpreter::BasicType_as_index(BasicType type) { int i = 0; switch (type) { -#ifdef AARCH64 - case T_BOOLEAN: i = 0; break; - case T_CHAR : i = 1; break; - case T_BYTE : i = 2; break; - case T_SHORT : i = 3; break; - case T_INT : // fall through - case T_LONG : // fall through - case T_VOID : // fall through - case T_FLOAT : // fall through - case T_DOUBLE : i = 4; break; - case T_OBJECT : // fall through - case T_ARRAY : i = 5; break; -#else case T_VOID : i = 0; break; case T_BOOLEAN: i = 1; break; case T_CHAR : i = 2; break; @@ -62,7 +49,6 @@ case T_LONG : i = 7; break; case T_FLOAT : i = 8; break; case T_DOUBLE : i = 9; break; -#endif // AARCH64 default : ShouldNotReachHere(); } assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, "index out of bounds"); @@ -71,7 +57,7 @@ // How much stack a method activation needs in words. int AbstractInterpreter::size_top_interpreter_activation(Method* method) { - const int stub_code = AARCH64_ONLY(24) NOT_AARCH64(12); // see generate_call_stub + const int stub_code = 12; // see generate_call_stub // Save space for one monitor to get into the interpreted method in case // the method is synchronized int monitor_size = method->is_synchronized() ? @@ -108,9 +94,6 @@ (moncount*frame::interpreter_frame_monitor_size()) + tempcount*Interpreter::stackElementWords + extra_args; -#ifdef AARCH64 - size = align_up(size, StackAlignmentInBytes/BytesPerWord); -#endif // AARCH64 return size; } @@ -146,65 +129,7 @@ // interpreter_frame_sender_sp is the original sp of the caller (the unextended_sp) // and sender_sp is (fp + sender_sp_offset*wordSize) -#ifdef AARCH64 - intptr_t* locals; - if (caller->is_interpreted_frame()) { - // attach locals to the expression stack of caller interpreter frame - locals = caller->interpreter_frame_tos_address() + caller_actual_parameters*Interpreter::stackElementWords - 1; - } else { - assert (is_bottom_frame, "should be"); - locals = interpreter_frame->fp() + frame::sender_sp_offset + method->max_locals() - 1; - } - - if (TraceDeoptimization) { - tty->print_cr("layout_activation:"); - - if (caller->is_entry_frame()) { - tty->print("entry "); - } - if (caller->is_compiled_frame()) { - tty->print("compiled "); - } - if (caller->is_interpreted_frame()) { - tty->print("interpreted "); - } - tty->print_cr("caller: sp=%p, unextended_sp=%p, fp=%p, pc=%p", caller->sp(), caller->unextended_sp(), caller->fp(), caller->pc()); - tty->print_cr("interpreter_frame: sp=%p, unextended_sp=%p, fp=%p, pc=%p", interpreter_frame->sp(), interpreter_frame->unextended_sp(), interpreter_frame->fp(), interpreter_frame->pc()); - tty->print_cr("method: max_locals = %d, size_of_parameters = %d", method->max_locals(), method->size_of_parameters()); - tty->print_cr("caller_actual_parameters = %d", caller_actual_parameters); - tty->print_cr("locals = %p", locals); - } - -#ifdef ASSERT - if (caller_actual_parameters != method->size_of_parameters()) { - assert(caller->is_interpreted_frame(), "adjusted caller_actual_parameters, but caller is not interpreter frame"); - Bytecode_invoke inv(caller->interpreter_frame_method(), caller->interpreter_frame_bci()); - - if (is_bottom_frame) { - assert(caller_actual_parameters == 0, "invalid adjusted caller_actual_parameters value for bottom frame"); - assert(inv.is_invokedynamic() || inv.is_invokehandle(), "adjusted caller_actual_parameters for bottom frame, but not invokedynamic/invokehandle"); - } else { - assert(caller_actual_parameters == method->size_of_parameters()+1, "invalid adjusted caller_actual_parameters value"); - assert(!inv.is_invokedynamic() && MethodHandles::has_member_arg(inv.klass(), inv.name()), "adjusted caller_actual_parameters, but no member arg"); - } - } - if (caller->is_interpreted_frame()) { - intptr_t* locals_base = (locals - method->max_locals()*Interpreter::stackElementWords + 1); - locals_base = align_down(locals_base, StackAlignmentInBytes); - assert(interpreter_frame->sender_sp() <= locals_base, "interpreter-to-interpreter frame chaining"); - - } else if (caller->is_compiled_frame()) { - assert(locals + 1 <= caller->unextended_sp(), "compiled-to-interpreter frame chaining"); - - } else { - assert(caller->is_entry_frame(), "should be"); - assert(locals + 1 <= caller->fp(), "entry-to-interpreter frame chaining"); - } -#endif // ASSERT - -#else intptr_t* locals = interpreter_frame->sender_sp() + max_locals - 1; -#endif // AARCH64 interpreter_frame->interpreter_frame_set_locals(locals); BasicObjectLock* montop = interpreter_frame->interpreter_frame_monitor_begin(); @@ -215,44 +140,16 @@ intptr_t* stack_top = (intptr_t*) monbot - tempcount*Interpreter::stackElementWords - popframe_extra_args; -#ifdef AARCH64 - interpreter_frame->interpreter_frame_set_stack_top(stack_top); - - // We have to add extra reserved slots to max_stack. There are 3 users of the extra slots, - // none of which are at the same time, so we just need to make sure there is enough room - // for the biggest user: - // -reserved slot for exception handler - // -reserved slots for JSR292. Method::extra_stack_entries() is the size. - // -3 reserved slots so get_method_counters() can save some registers before call_VM(). - int max_stack = method->constMethod()->max_stack() + MAX2(3, Method::extra_stack_entries()); - intptr_t* extended_sp = (intptr_t*) monbot - - (max_stack * Interpreter::stackElementWords) - - popframe_extra_args; - extended_sp = align_down(extended_sp, StackAlignmentInBytes); - interpreter_frame->interpreter_frame_set_extended_sp(extended_sp); -#else interpreter_frame->interpreter_frame_set_last_sp(stack_top); -#endif // AARCH64 // All frames but the initial (oldest) interpreter frame we fill in have a // value for sender_sp that allows walking the stack but isn't // truly correct. Correct the value here. -#ifdef AARCH64 - if (caller->is_interpreted_frame()) { - intptr_t* sender_sp = align_down(caller->interpreter_frame_tos_address(), StackAlignmentInBytes); - interpreter_frame->set_interpreter_frame_sender_sp(sender_sp); - - } else { - // in case of non-interpreter caller sender_sp of the oldest frame is already - // set to valid value - } -#else if (extra_locals != 0 && interpreter_frame->sender_sp() == interpreter_frame->interpreter_frame_sender_sp() ) { interpreter_frame->set_interpreter_frame_sender_sp(caller->sp() + extra_locals); } -#endif // AARCH64 *interpreter_frame->interpreter_frame_cache_addr() = method->constants()->cache();