< prev index next >

src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp

Print this page




  59 // "bcr 15, 0" is used as two way memory barrier.
  60 #define inlasm_zarch_sync() __asm__ __volatile__ ("bcr 15, 0" : : : "memory");
  61 
  62 // Release and acquire are empty on z/Architecture, but potential
  63 // optimizations of gcc must be forbidden by OrderAccess::release and
  64 // OrderAccess::acquire.
  65 #define inlasm_zarch_release() inlasm_compiler_barrier()
  66 #define inlasm_zarch_acquire() inlasm_compiler_barrier()
  67 #define inlasm_zarch_fence()   inlasm_zarch_sync()
  68 
  69 inline void OrderAccess::loadload()   { inlasm_compiler_barrier(); }
  70 inline void OrderAccess::storestore() { inlasm_compiler_barrier(); }
  71 inline void OrderAccess::loadstore()  { inlasm_compiler_barrier(); }
  72 inline void OrderAccess::storeload()  { inlasm_zarch_sync(); }
  73 
  74 inline void OrderAccess::acquire()    { inlasm_zarch_acquire(); }
  75 inline void OrderAccess::release()    { inlasm_zarch_release(); }
  76 inline void OrderAccess::fence()      { inlasm_zarch_sync(); }
  77 inline void OrderAccess::cross_modify_fence() { inlasm_zarch_sync(); }
  78 
  79 template<size_t byte_size>
  80 struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
  81 {
  82   template <typename T>
  83   T operator()(const volatile T* p) const { T t = *p; inlasm_zarch_acquire(); return t; }
  84 };
  85 
  86 #undef inlasm_compiler_barrier
  87 #undef inlasm_zarch_sync
  88 #undef inlasm_zarch_release
  89 #undef inlasm_zarch_acquire
  90 #undef inlasm_zarch_fence
  91 
  92 #endif // OS_CPU_LINUX_S390_ORDERACCESS_LINUX_S390_HPP


  59 // "bcr 15, 0" is used as two way memory barrier.
  60 #define inlasm_zarch_sync() __asm__ __volatile__ ("bcr 15, 0" : : : "memory");
  61 
  62 // Release and acquire are empty on z/Architecture, but potential
  63 // optimizations of gcc must be forbidden by OrderAccess::release and
  64 // OrderAccess::acquire.
  65 #define inlasm_zarch_release() inlasm_compiler_barrier()
  66 #define inlasm_zarch_acquire() inlasm_compiler_barrier()
  67 #define inlasm_zarch_fence()   inlasm_zarch_sync()
  68 
  69 inline void OrderAccess::loadload()   { inlasm_compiler_barrier(); }
  70 inline void OrderAccess::storestore() { inlasm_compiler_barrier(); }
  71 inline void OrderAccess::loadstore()  { inlasm_compiler_barrier(); }
  72 inline void OrderAccess::storeload()  { inlasm_zarch_sync(); }
  73 
  74 inline void OrderAccess::acquire()    { inlasm_zarch_acquire(); }
  75 inline void OrderAccess::release()    { inlasm_zarch_release(); }
  76 inline void OrderAccess::fence()      { inlasm_zarch_sync(); }
  77 inline void OrderAccess::cross_modify_fence() { inlasm_zarch_sync(); }
  78 







  79 #undef inlasm_compiler_barrier
  80 #undef inlasm_zarch_sync
  81 #undef inlasm_zarch_release
  82 #undef inlasm_zarch_acquire
  83 #undef inlasm_zarch_fence
  84 
  85 #endif // OS_CPU_LINUX_S390_ORDERACCESS_LINUX_S390_HPP
< prev index next >