< prev index next >

src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp

Print this page
rev 49948 : 8201593: Print array length in ArrayIndexOutOfBoundsException.
Reviewed-by: dholmes, mdoerr, smonteith


 238   __ jump_to(thrower, G3_scratch);
 239   __ delayed()->nop();
 240   return entry;
 241 }
 242 
 243 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
 244   address entry = __ pc();
 245   // expression stack must be empty before entering the VM if an exception
 246   // happened
 247   __ empty_expression_stack();
 248   // load exception object
 249   __ call_VM(Oexception,
 250              CAST_FROM_FN_PTR(address,
 251                               InterpreterRuntime::throw_ClassCastException),
 252              Otos_i);
 253   __ should_not_reach_here();
 254   return entry;
 255 }
 256 
 257 
 258 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) {
 259   address entry = __ pc();
 260   // expression stack must be empty before entering the VM if an exception happened
 261   __ empty_expression_stack();

 262   // convention: expect aberrant index in register G3_scratch, then shuffle the
 263   // index to G4_scratch for the VM call
 264   __ mov(G3_scratch, G4_scratch);
 265   __ set((intptr_t)name, G3_scratch);
 266   __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), G3_scratch, G4_scratch);
 267   __ should_not_reach_here();
 268   return entry;
 269 }
 270 
 271 
 272 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
 273   address entry = __ pc();
 274   // expression stack must be empty before entering the VM if an exception happened
 275   __ empty_expression_stack();
 276   __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
 277   __ should_not_reach_here();
 278   return entry;
 279 }
 280 
 281 
 282 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
 283   address entry = __ pc();
 284 
 285   if (state == atos) {
 286     __ profile_return_type(O0, G3_scratch, G1_scratch);




 238   __ jump_to(thrower, G3_scratch);
 239   __ delayed()->nop();
 240   return entry;
 241 }
 242 
 243 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
 244   address entry = __ pc();
 245   // expression stack must be empty before entering the VM if an exception
 246   // happened
 247   __ empty_expression_stack();
 248   // load exception object
 249   __ call_VM(Oexception,
 250              CAST_FROM_FN_PTR(address,
 251                               InterpreterRuntime::throw_ClassCastException),
 252              Otos_i);
 253   __ should_not_reach_here();
 254   return entry;
 255 }
 256 
 257 
 258 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler() {
 259   address entry = __ pc();
 260   // expression stack must be empty before entering the VM if an exception happened
 261   __ empty_expression_stack();
 262   // Pass the array to create more detailed exceptions.
 263   // convention: expect aberrant index in register G3_scratch, then shuffle the
 264   // index to G4_scratch for the VM call
 265   __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), G3_scratch, Otos_i);


 266   __ should_not_reach_here();
 267   return entry;
 268 }
 269 
 270 
 271 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
 272   address entry = __ pc();
 273   // expression stack must be empty before entering the VM if an exception happened
 274   __ empty_expression_stack();
 275   __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
 276   __ should_not_reach_here();
 277   return entry;
 278 }
 279 
 280 
 281 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
 282   address entry = __ pc();
 283 
 284   if (state == atos) {
 285     __ profile_return_type(O0, G3_scratch, G1_scratch);


< prev index next >