< prev index next >

src/cpu/x86/vm/macroAssembler_x86.cpp

Print this page

        

*** 37,46 **** --- 37,47 ---- #include "runtime/interfaceSupport.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" + #include "runtime/thread.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1SATBCardTableModRefBS.hpp" #include "gc/g1/heapRegion.hpp"
*** 9753,9757 **** --- 9754,9798 ---- } SkipIfEqual::~SkipIfEqual() { _masm->bind(_label); } + + // 32-bit Windows has its own fast-path implementation + // of get_thread + #if !defined(WIN32) || defined(_LP64) + + // This is simply a call to Thread::current() + void MacroAssembler::get_thread(Register thread) { + if (thread != rax) { + push(rax); + } + LP64_ONLY(push(rdi);) + LP64_ONLY(push(rsi);) + push(rdx); + push(rcx); + #ifdef _LP64 + push(r8); + push(r9); + push(r10); + push(r11); + #endif + + call_VM_leaf_base(CAST_FROM_FN_PTR(address, Thread::current), 0); + + #ifdef _LP64 + pop(r11); + pop(r10); + pop(r9); + pop(r8); + #endif + pop(rcx); + pop(rdx); + LP64_ONLY(pop(rsi);) + LP64_ONLY(pop(rdi);) + if (thread != rax) { + mov(thread, rax); + pop(rax); + } + } + + #endif
< prev index next >