36 #include "prims/methodHandles.hpp" |
36 #include "prims/methodHandles.hpp" |
37 #include "runtime/biasedLocking.hpp" |
37 #include "runtime/biasedLocking.hpp" |
38 #include "runtime/interfaceSupport.hpp" |
38 #include "runtime/interfaceSupport.hpp" |
39 #include "runtime/objectMonitor.hpp" |
39 #include "runtime/objectMonitor.hpp" |
40 #include "runtime/os.hpp" |
40 #include "runtime/os.hpp" |
|
41 #include "runtime/safepoint.hpp" |
|
42 #include "runtime/safepointMechanism.hpp" |
41 #include "runtime/sharedRuntime.hpp" |
43 #include "runtime/sharedRuntime.hpp" |
42 #include "runtime/stubRoutines.hpp" |
44 #include "runtime/stubRoutines.hpp" |
43 #include "runtime/thread.hpp" |
45 #include "runtime/thread.hpp" |
44 #include "utilities/macros.hpp" |
46 #include "utilities/macros.hpp" |
45 #if INCLUDE_ALL_GCS |
47 #if INCLUDE_ALL_GCS |
3757 |
3759 |
3758 // Size of store must match masking code above |
3760 // Size of store must match masking code above |
3759 movl(as_Address(ArrayAddress(page, index)), tmp); |
3761 movl(as_Address(ArrayAddress(page, index)), tmp); |
3760 } |
3762 } |
3761 |
3763 |
|
3764 #ifdef _LP64 |
|
3765 void MacroAssembler::safepoint_poll(Label& slow_path, Register thread_reg, Register temp_reg) { |
|
3766 if (SafepointMechanism::uses_thread_local_poll()) { |
|
3767 testb(Address(r15_thread, Thread::polling_page_offset()), SafepointMechanism::poll_bit()); |
|
3768 jcc(Assembler::notZero, slow_path); // handshake bit set implies poll |
|
3769 } else { |
|
3770 cmp32(ExternalAddress(SafepointSynchronize::address_of_state()), |
|
3771 SafepointSynchronize::_not_synchronized); |
|
3772 jcc(Assembler::notEqual, slow_path); |
|
3773 } |
|
3774 } |
|
3775 #else |
|
3776 void MacroAssembler::safepoint_poll(Label& slow_path) { |
|
3777 cmp32(ExternalAddress(SafepointSynchronize::address_of_state()), |
|
3778 SafepointSynchronize::_not_synchronized); |
|
3779 jcc(Assembler::notEqual, slow_path); |
|
3780 } |
|
3781 #endif |
|
3782 |
3762 // Calls to C land |
3783 // Calls to C land |
3763 // |
3784 // |
3764 // When entering C land, the rbp, & rsp of the last Java frame have to be recorded |
3785 // When entering C land, the rbp, & rsp of the last Java frame have to be recorded |
3765 // in the (thread-local) JavaThread object. When leaving C land, the last Java fp |
3786 // in the (thread-local) JavaThread object. When leaving C land, the last Java fp |
3766 // has to be reset to 0. This is required to allow proper stack traversal. |
3787 // has to be reset to 0. This is required to allow proper stack traversal. |