111 __ jump_to(thrower, G3_scratch); 112 __ delayed()->nop(); 113 return entry; 114 } 115 116 address TemplateInterpreterGenerator::generate_ClassCastException_handler() { 117 address entry = __ pc(); 118 // expression stack must be empty before entering the VM if an exception 119 // happened 120 __ empty_expression_stack(); 121 // load exception object 122 __ call_VM(Oexception, 123 CAST_FROM_FN_PTR(address, 124 InterpreterRuntime::throw_ClassCastException), 125 Otos_i); 126 __ should_not_reach_here(); 127 return entry; 128 } 129 130 131 // Arguments are: required type in G5_method_type, and 132 // failing object (or NULL) in G3_method_handle. 133 address TemplateInterpreterGenerator::generate_WrongMethodType_handler() { 134 address entry = __ pc(); 135 // expression stack must be empty before entering the VM if an exception 136 // happened 137 __ empty_expression_stack(); 138 // load exception object 139 __ call_VM(Oexception, 140 CAST_FROM_FN_PTR(address, 141 InterpreterRuntime::throw_WrongMethodTypeException), 142 G5_method_type, // required 143 G3_method_handle); // actual 144 __ should_not_reach_here(); 145 return entry; 146 } 147 148 149 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) { 150 address entry = __ pc(); 151 // expression stack must be empty before entering the VM if an exception happened 152 __ empty_expression_stack(); 153 // convention: expect aberrant index in register G3_scratch, then shuffle the 154 // index to G4_scratch for the VM call 155 __ mov(G3_scratch, G4_scratch); 156 __ set((intptr_t)name, G3_scratch); 157 __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), G3_scratch, G4_scratch); 158 __ should_not_reach_here(); 159 return entry; 160 } 161 162 163 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() { 164 address entry = __ pc(); 165 // expression stack must be empty before entering the VM if an exception happened 166 __ empty_expression_stack(); 167 __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError)); 168 __ should_not_reach_here(); | 111 __ jump_to(thrower, G3_scratch); 112 __ delayed()->nop(); 113 return entry; 114 } 115 116 address TemplateInterpreterGenerator::generate_ClassCastException_handler() { 117 address entry = __ pc(); 118 // expression stack must be empty before entering the VM if an exception 119 // happened 120 __ empty_expression_stack(); 121 // load exception object 122 __ call_VM(Oexception, 123 CAST_FROM_FN_PTR(address, 124 InterpreterRuntime::throw_ClassCastException), 125 Otos_i); 126 __ should_not_reach_here(); 127 return entry; 128 } 129 130 131 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) { 132 address entry = __ pc(); 133 // expression stack must be empty before entering the VM if an exception happened 134 __ empty_expression_stack(); 135 // convention: expect aberrant index in register G3_scratch, then shuffle the 136 // index to G4_scratch for the VM call 137 __ mov(G3_scratch, G4_scratch); 138 __ set((intptr_t)name, G3_scratch); 139 __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), G3_scratch, G4_scratch); 140 __ should_not_reach_here(); 141 return entry; 142 } 143 144 145 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() { 146 address entry = __ pc(); 147 // expression stack must be empty before entering the VM if an exception happened 148 __ empty_expression_stack(); 149 __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError)); 150 __ should_not_reach_here(); |