547 __ blr();
548
549 __ bind(slow_path);
550 __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::zerolocals), R11_scratch1);
551 return entry;
552 }
553
554 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
555 address entry = __ pc();
556
557 // Expression stack must be empty before entering the VM if an
558 // exception happened.
559 __ empty_expression_stack();
560 // Throw exception.
561 __ call_VM(noreg,
562 CAST_FROM_FN_PTR(address,
563 InterpreterRuntime::throw_StackOverflowError));
564 return entry;
565 }
566
567 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) {
568 address entry = __ pc();
569 __ empty_expression_stack();
570 __ load_const_optimized(R4_ARG2, (address) name);
571 // Index is in R17_tos.
572 __ mr(R5_ARG3, R17_tos);
573 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException));
574 return entry;
575 }
576
577 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
578 address entry = __ pc();
579 // Expression stack must be empty before entering the VM if an
580 // exception happened.
581 __ empty_expression_stack();
582
583 // Load exception object.
584 // Thread will be loaded to R3_ARG1.
585 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ClassCastException), R17_tos);
586 #ifdef ASSERT
587 // Above call must not return here since exception pending.
588 __ should_not_reach_here();
589 #endif
590 return entry;
591 }
592
593 address TemplateInterpreterGenerator::generate_exception_handler_common(const char* name, const char* message, bool pass_oop) {
|
547 __ blr();
548
549 __ bind(slow_path);
550 __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::zerolocals), R11_scratch1);
551 return entry;
552 }
553
554 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
555 address entry = __ pc();
556
557 // Expression stack must be empty before entering the VM if an
558 // exception happened.
559 __ empty_expression_stack();
560 // Throw exception.
561 __ call_VM(noreg,
562 CAST_FROM_FN_PTR(address,
563 InterpreterRuntime::throw_StackOverflowError));
564 return entry;
565 }
566
567 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler() {
568 address entry = __ pc();
569 __ empty_expression_stack();
570 // Index is in R17_tos.
571 __ mr(R5_ARG3, R17_tos);
572 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), R4_ARG2, R5_ARG3);
573 return entry;
574 }
575
576 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
577 address entry = __ pc();
578 // Expression stack must be empty before entering the VM if an
579 // exception happened.
580 __ empty_expression_stack();
581
582 // Load exception object.
583 // Thread will be loaded to R3_ARG1.
584 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ClassCastException), R17_tos);
585 #ifdef ASSERT
586 // Above call must not return here since exception pending.
587 __ should_not_reach_here();
588 #endif
589 return entry;
590 }
591
592 address TemplateInterpreterGenerator::generate_exception_handler_common(const char* name, const char* message, bool pass_oop) {
|