562 CAST_FROM_FN_PTR(address, |
562 CAST_FROM_FN_PTR(address, |
563 InterpreterRuntime::throw_StackOverflowError)); |
563 InterpreterRuntime::throw_StackOverflowError)); |
564 return entry; |
564 return entry; |
565 } |
565 } |
566 |
566 |
567 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) { |
567 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler() { |
568 address entry = __ pc(); |
568 address entry = __ pc(); |
569 __ empty_expression_stack(); |
569 __ empty_expression_stack(); |
570 __ load_const_optimized(R4_ARG2, (address) name); |
570 // R4_ARG2 already contains the array. |
571 // Index is in R17_tos. |
571 // Index is in R17_tos. |
572 __ mr(R5_ARG3, R17_tos); |
572 __ mr(R5_ARG3, R17_tos); |
573 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException)); |
573 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), R4_ARG2, R5_ARG3); |
574 return entry; |
574 return entry; |
575 } |
575 } |
576 |
576 |
577 address TemplateInterpreterGenerator::generate_ClassCastException_handler() { |
577 address TemplateInterpreterGenerator::generate_ClassCastException_handler() { |
578 address entry = __ pc(); |
578 address entry = __ pc(); |