Print this page


Split Close
Expand all
Collapse all
          --- old/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp
          +++ new/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp
↓ open down ↓ 671 lines elided ↑ open up ↑
 672  672          // O0: exception
 673  673          // I7: address of call to this method
 674  674  
 675  675          __ set_info("unwind_exception", dont_gc_arguments);
 676  676          __ mov(Oexception, Oexception->after_save());
 677  677          __ add(I7, frame::pc_return_offset, Oissuing_pc->after_save());
 678  678  
 679  679          __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address),
 680  680                          G2_thread, Oissuing_pc->after_save());
 681  681          __ verify_not_null_oop(Oexception->after_save());
 682      -        __ jmp(O0, 0);
 683      -        __ delayed()->restore();
      682 +
      683 +        // Restore SP from L7 if the exception PC is a MethodHandle call site.
      684 +        __ mov(O0, G5);  // Save the target address.
      685 +        __ lduw(Address(G2_thread, JavaThread::is_method_handle_return_offset()), L0);
      686 +        __ tst(L0);  // Condition codes are preserved over the restore.
      687 +        __ restore();
      688 +
      689 +        __ jmp(G5, 0);
      690 +        __ delayed()->movcc(Assembler::notZero, false, Assembler::icc, L7, SP);  // Restore SP if required.
 684  691        }
 685  692        break;
 686  693  
 687  694      case throw_array_store_exception_id:
 688  695        {
 689  696          __ set_info("throw_array_store_exception", dont_gc_arguments);
 690  697          oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), false);
 691  698        }
 692  699        break;
 693  700  
↓ open down ↓ 333 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX