hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
changeset 30244 d4e471395ff5
parent 28947 2ea471384931
child 30310 522ea430079f
equal deleted inserted replaced
30240:a7ba42fa1df6 30244:d4e471395ff5
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  2579     }
  2579     }
  2580 
  2580 
  2581     __ lea(c_rarg1, Address(rsp, lock_slot_offset * VMRegImpl::stack_slot_size));
  2581     __ lea(c_rarg1, Address(rsp, lock_slot_offset * VMRegImpl::stack_slot_size));
  2582 
  2582 
  2583     __ mov(c_rarg0, obj_reg);
  2583     __ mov(c_rarg0, obj_reg);
       
  2584     __ mov(c_rarg2, r15_thread);
  2584     __ mov(r12, rsp); // remember sp
  2585     __ mov(r12, rsp); // remember sp
  2585     __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
  2586     __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
  2586     __ andptr(rsp, -16); // align stack as required by ABI
  2587     __ andptr(rsp, -16); // align stack as required by ABI
  2587 
  2588 
  2588     // Save pending exception around call to VM (which contains an EXCEPTION_MARK)
  2589     // Save pending exception around call to VM (which contains an EXCEPTION_MARK)
  2589     // NOTE that obj_reg == rbx currently
  2590     // NOTE that obj_reg == rbx currently
  2590     __ movptr(rbx, Address(r15_thread, in_bytes(Thread::pending_exception_offset())));
  2591     __ movptr(rbx, Address(r15_thread, in_bytes(Thread::pending_exception_offset())));
  2591     __ movptr(Address(r15_thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
  2592     __ movptr(Address(r15_thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
  2592 
  2593 
       
  2594     // args are (oop obj, BasicLock* lock, JavaThread* thread)
  2593     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_unlocking_C)));
  2595     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_unlocking_C)));
  2594     __ mov(rsp, r12); // restore sp
  2596     __ mov(rsp, r12); // restore sp
  2595     __ reinit_heapbase();
  2597     __ reinit_heapbase();
  2596 #ifdef ASSERT
  2598 #ifdef ASSERT
  2597     {
  2599     {