src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6705887 Sdiff src/os_cpu/windows_x86/vm

src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp

Print this page




  42 //  the offset we had hard coded in the VM kept changing as Microsoft
  43 //  evolved the OS.
  44 //
  45 // Warning: This mechanism assumes that we only attempt to get the
  46 //          thread when we are nested below a call wrapper.
  47 //
  48 // movl reg, fs:[0]                        Get exeception pointer
  49 // movl reg, [reg + thread_ptr_offset]     Load thread
  50 //
  51 void MacroAssembler::get_thread(Register thread) {
  52   // can't use ExternalAddress because it can't take NULL
  53   AddressLiteral null(0, relocInfo::none);
  54 
  55   prefix(FS_segment);
  56   movptr(thread, null);
  57   assert(ThreadLocalStorage::get_thread_ptr_offset() != 0,
  58          "Thread Pointer Offset has not been initialized");
  59   movl(thread, Address(thread, ThreadLocalStorage::get_thread_ptr_offset()));
  60 }
  61 
  62 bool MacroAssembler::needs_explicit_null_check(int offset) {
  63   return offset < 0 || (int)os::vm_page_size() <= offset;
  64 }


  42 //  the offset we had hard coded in the VM kept changing as Microsoft
  43 //  evolved the OS.
  44 //
  45 // Warning: This mechanism assumes that we only attempt to get the
  46 //          thread when we are nested below a call wrapper.
  47 //
  48 // movl reg, fs:[0]                        Get exeception pointer
  49 // movl reg, [reg + thread_ptr_offset]     Load thread
  50 //
  51 void MacroAssembler::get_thread(Register thread) {
  52   // can't use ExternalAddress because it can't take NULL
  53   AddressLiteral null(0, relocInfo::none);
  54 
  55   prefix(FS_segment);
  56   movptr(thread, null);
  57   assert(ThreadLocalStorage::get_thread_ptr_offset() != 0,
  58          "Thread Pointer Offset has not been initialized");
  59   movl(thread, Address(thread, ThreadLocalStorage::get_thread_ptr_offset()));
  60 }
  61 
  62 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
  63   return offset < 0 || (int)os::vm_page_size() <= offset;
  64 }
src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File