100 CAST_FROM_FN_PTR(address, |
100 CAST_FROM_FN_PTR(address, |
101 InterpreterRuntime::throw_StackOverflowError)); |
101 InterpreterRuntime::throw_StackOverflowError)); |
102 return entry; |
102 return entry; |
103 } |
103 } |
104 |
104 |
105 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler( |
105 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler() { |
106 const char* name) { |
|
107 address entry = __ pc(); |
106 address entry = __ pc(); |
108 // expression stack must be empty before entering the VM if an |
107 // The expression stack must be empty before entering the VM if an |
109 // exception happened |
108 // exception happened. |
110 __ empty_expression_stack(); |
109 __ empty_expression_stack(); |
111 // setup parameters |
110 |
112 // ??? convention: expect aberrant index in register ebx |
111 // Setup parameters. |
|
112 // ??? convention: expect aberrant index in register ebx/rbx. |
|
113 // Pass array to create more detailed exceptions. |
113 Register rarg = NOT_LP64(rax) LP64_ONLY(c_rarg1); |
114 Register rarg = NOT_LP64(rax) LP64_ONLY(c_rarg1); |
114 __ lea(rarg, ExternalAddress((address)name)); |
|
115 __ call_VM(noreg, |
115 __ call_VM(noreg, |
116 CAST_FROM_FN_PTR(address, |
116 CAST_FROM_FN_PTR(address, |
117 InterpreterRuntime:: |
117 InterpreterRuntime:: |
118 throw_ArrayIndexOutOfBoundsException), |
118 throw_ArrayIndexOutOfBoundsException), |
119 rarg, rbx); |
119 rarg, rbx); |