src/cpu/sparc/vm/c1_Runtime1_sparc.cpp

changeset 1730
3cf667df43ef
parent 1162
6b2273dd6fa9
child 1907
c18cbe5936b8
child 1919
61b2245abf36
     1.1 --- a/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Mon Mar 08 04:46:30 2010 -0800
     1.2 +++ b/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Tue Mar 09 20:16:19 2010 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1999-2010 Sun Microsystems, Inc.  All Rights Reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -677,7 +677,7 @@
    1.11          __ add(I7, frame::pc_return_offset, Oissuing_pc->after_save());
    1.12  
    1.13          __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address),
    1.14 -                        Oissuing_pc->after_save());
    1.15 +                        G2_thread, Oissuing_pc->after_save());
    1.16          __ verify_not_null_oop(Oexception->after_save());
    1.17          __ jmp(O0, 0);
    1.18          __ delayed()->restore();
    1.19 @@ -985,7 +985,6 @@
    1.20  
    1.21  void Runtime1::generate_handle_exception(StubAssembler* sasm, OopMapSet* oop_maps, OopMap* oop_map, bool) {
    1.22    Label no_deopt;
    1.23 -  Label no_handler;
    1.24  
    1.25    __ verify_not_null_oop(Oexception);
    1.26  
    1.27 @@ -1003,9 +1002,14 @@
    1.28    // whether it had a handler or not we will deoptimize
    1.29    // by entering the deopt blob with a pending exception.
    1.30  
    1.31 +#ifdef ASSERT
    1.32 +  Label done;
    1.33    __ tst(O0);
    1.34 -  __ br(Assembler::zero, false, Assembler::pn, no_handler);
    1.35 +  __ br(Assembler::notZero, false, Assembler::pn, done);
    1.36    __ delayed()->nop();
    1.37 +  __ stop("should have found address");
    1.38 +  __ bind(done);
    1.39 +#endif
    1.40  
    1.41    // restore the registers that were saved at the beginning and jump to the exception handler.
    1.42    restore_live_registers(sasm);
    1.43 @@ -1013,20 +1017,6 @@
    1.44    __ jmp(O0, 0);
    1.45    __ delayed()->restore();
    1.46  
    1.47 -  __ bind(no_handler);
    1.48 -  __ mov(L0, I7); // restore return address
    1.49 -
    1.50 -  // restore exception oop
    1.51 -  __ ld_ptr(G2_thread, in_bytes(JavaThread::exception_oop_offset()), Oexception->after_save());
    1.52 -  __ st_ptr(G0, G2_thread, in_bytes(JavaThread::exception_oop_offset()));
    1.53 -
    1.54 -  __ restore();
    1.55 -
    1.56 -  AddressLiteral exc(Runtime1::entry_for(Runtime1::unwind_exception_id));
    1.57 -  __ jump_to(exc, G4);
    1.58 -  __ delayed()->nop();
    1.59 -
    1.60 -
    1.61    oop_maps->add_gc_map(call_offset, oop_map);
    1.62  }
    1.63  

mercurial