hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp
changeset 18949 61c970d02a94
parent 15855 2ac9ebea17f3
child 19321 472b811d22cc
equal deleted inserted replaced
18947:a618cc62ae1c 18949:61c970d02a94
    70 inline jubyte   OrderAccess::load_acquire(volatile jubyte*  p) { return *p; }
    70 inline jubyte   OrderAccess::load_acquire(volatile jubyte*  p) { return *p; }
    71 inline jushort  OrderAccess::load_acquire(volatile jushort* p) { return *p; }
    71 inline jushort  OrderAccess::load_acquire(volatile jushort* p) { return *p; }
    72 inline juint    OrderAccess::load_acquire(volatile juint*   p) { return *p; }
    72 inline juint    OrderAccess::load_acquire(volatile juint*   p) { return *p; }
    73 inline julong   OrderAccess::load_acquire(volatile julong*  p) { return Atomic::load((volatile jlong*)p); }
    73 inline julong   OrderAccess::load_acquire(volatile julong*  p) { return Atomic::load((volatile jlong*)p); }
    74 inline jfloat   OrderAccess::load_acquire(volatile jfloat*  p) { return *p; }
    74 inline jfloat   OrderAccess::load_acquire(volatile jfloat*  p) { return *p; }
    75 inline jdouble  OrderAccess::load_acquire(volatile jdouble* p) { return *p; }
    75 inline jdouble  OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
    76 
    76 
    77 inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t*   p) { return *p; }
    77 inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t*   p) { return *p; }
    78 inline void*    OrderAccess::load_ptr_acquire(volatile void*       p) { return *(void* volatile *)p; }
    78 inline void*    OrderAccess::load_ptr_acquire(volatile void*       p) { return *(void* volatile *)p; }
    79 inline void*    OrderAccess::load_ptr_acquire(const volatile void* p) { return *(void* const volatile *)p; }
    79 inline void*    OrderAccess::load_ptr_acquire(const volatile void* p) { return *(void* const volatile *)p; }
    80 
    80 
    85 inline void     OrderAccess::release_store(volatile jubyte*  p, jubyte  v) { *p = v; }
    85 inline void     OrderAccess::release_store(volatile jubyte*  p, jubyte  v) { *p = v; }
    86 inline void     OrderAccess::release_store(volatile jushort* p, jushort v) { *p = v; }
    86 inline void     OrderAccess::release_store(volatile jushort* p, jushort v) { *p = v; }
    87 inline void     OrderAccess::release_store(volatile juint*   p, juint   v) { *p = v; }
    87 inline void     OrderAccess::release_store(volatile juint*   p, juint   v) { *p = v; }
    88 inline void     OrderAccess::release_store(volatile julong*  p, julong  v) { Atomic::store((jlong)v, (volatile jlong*)p); }
    88 inline void     OrderAccess::release_store(volatile julong*  p, julong  v) { Atomic::store((jlong)v, (volatile jlong*)p); }
    89 inline void     OrderAccess::release_store(volatile jfloat*  p, jfloat  v) { *p = v; }
    89 inline void     OrderAccess::release_store(volatile jfloat*  p, jfloat  v) { *p = v; }
    90 inline void     OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; }
    90 inline void     OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong*)p, jlong_cast(v)); }
    91 
    91 
    92 inline void     OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
    92 inline void     OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
    93 inline void     OrderAccess::release_store_ptr(volatile void*     p, void*    v) { *(void* volatile *)p = v; }
    93 inline void     OrderAccess::release_store_ptr(volatile void*     p, void*    v) { *(void* volatile *)p = v; }
    94 
    94 
    95 inline void     OrderAccess::store_fence(jbyte*  p, jbyte  v) {
    95 inline void     OrderAccess::store_fence(jbyte*  p, jbyte  v) {
   188 inline void     OrderAccess::release_store_fence(volatile jushort* p, jushort v) { release_store_fence((volatile jshort*)p, (jshort)v); }
   188 inline void     OrderAccess::release_store_fence(volatile jushort* p, jushort v) { release_store_fence((volatile jshort*)p, (jshort)v); }
   189 inline void     OrderAccess::release_store_fence(volatile juint*   p, juint   v) { release_store_fence((volatile jint*)p,   (jint)v);   }
   189 inline void     OrderAccess::release_store_fence(volatile juint*   p, juint   v) { release_store_fence((volatile jint*)p,   (jint)v);   }
   190 inline void     OrderAccess::release_store_fence(volatile julong*  p, julong  v) { release_store_fence((volatile jlong*)p,  (jlong)v);  }
   190 inline void     OrderAccess::release_store_fence(volatile julong*  p, julong  v) { release_store_fence((volatile jlong*)p,  (jlong)v);  }
   191 
   191 
   192 inline void     OrderAccess::release_store_fence(volatile jfloat*  p, jfloat  v) { *p = v; fence(); }
   192 inline void     OrderAccess::release_store_fence(volatile jfloat*  p, jfloat  v) { *p = v; fence(); }
   193 inline void     OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { *p = v; fence(); }
   193 inline void     OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { release_store_fence((volatile jlong*)p, jdouble_cast(v)); }
   194 
   194 
   195 inline void     OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) {
   195 inline void     OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) {
   196 #ifdef AMD64
   196 #ifdef AMD64
   197   __asm__ __volatile__ (  "xchgq (%2), %0"
   197   __asm__ __volatile__ (  "xchgq (%2), %0"
   198                           : "=r" (v)
   198                           : "=r" (v)