522 __ cast_primitive_type(type, x10);
523 }
524
525 __ ret(); // return from result handler
526 return entry;
527 }
528
529 address TemplateInterpreterGenerator::generate_safept_entry_for(TosState state,
530 address runtime_entry) {
531 assert_cond(runtime_entry != nullptr);
532 address entry = __ pc();
533 __ push(state);
534 __ push_cont_fastpath(xthread);
535 __ call_VM(noreg, runtime_entry);
536 __ pop_cont_fastpath(xthread);
537 __ membar(MacroAssembler::AnyAny);
538 __ dispatch_via(vtos, Interpreter::_normal_table.table_for(vtos));
539 return entry;
540 }
541
542 // Helpers for commoning out cases in the various type of method entries.
543 //
544
545
546 // increment invocation count & check for overflow
547 //
548 // Note: checking for negative value instead of overflow
549 // so we have a 'sticky' overflow test
550 //
551 // xmethod: method
552 //
553 void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow) {
554 Label done;
555 // Note: In tiered we increment either counters in Method* or in MDO depending if we're profiling or not.
556 int increment = InvocationCounter::count_increment;
557 Label no_mdo;
558 if (ProfileInterpreter) {
559 // Are we profiling?
560 __ ld(x10, Address(xmethod, Method::method_data_offset()));
561 __ beqz(x10, no_mdo);
|
522 __ cast_primitive_type(type, x10);
523 }
524
525 __ ret(); // return from result handler
526 return entry;
527 }
528
529 address TemplateInterpreterGenerator::generate_safept_entry_for(TosState state,
530 address runtime_entry) {
531 assert_cond(runtime_entry != nullptr);
532 address entry = __ pc();
533 __ push(state);
534 __ push_cont_fastpath(xthread);
535 __ call_VM(noreg, runtime_entry);
536 __ pop_cont_fastpath(xthread);
537 __ membar(MacroAssembler::AnyAny);
538 __ dispatch_via(vtos, Interpreter::_normal_table.table_for(vtos));
539 return entry;
540 }
541
542 address TemplateInterpreterGenerator::generate_cont_preempt_rerun_interpreter_adapter() {
543 return nullptr;
544 }
545
546
547 // Helpers for commoning out cases in the various type of method entries.
548 //
549
550
551 // increment invocation count & check for overflow
552 //
553 // Note: checking for negative value instead of overflow
554 // so we have a 'sticky' overflow test
555 //
556 // xmethod: method
557 //
558 void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow) {
559 Label done;
560 // Note: In tiered we increment either counters in Method* or in MDO depending if we're profiling or not.
561 int increment = InvocationCounter::count_increment;
562 Label no_mdo;
563 if (ProfileInterpreter) {
564 // Are we profiling?
565 __ ld(x10, Address(xmethod, Method::method_data_offset()));
566 __ beqz(x10, no_mdo);
|