src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp
changeset 59247 56bf71d64d51
parent 54069 c4fb912f3085
child 59249 29b0d0b61615
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
    28 
    28 
    29 #ifndef PPC64
    29 #ifndef PPC64
    30 #error "Atomic currently only implemented for PPC64"
    30 #error "Atomic currently only implemented for PPC64"
    31 #endif
    31 #endif
    32 
    32 
       
    33 #include "orderAccess_aix_ppc.hpp"
    33 #include "utilities/debug.hpp"
    34 #include "utilities/debug.hpp"
    34 
    35 
    35 // Implementation of class atomic
    36 // Implementation of class atomic
    36 
    37 
    37 //
    38 //
   397   post_membar(order);
   398   post_membar(order);
   398 
   399 
   399   return old_value;
   400   return old_value;
   400 }
   401 }
   401 
   402 
       
   403 template<size_t byte_size>
       
   404 struct Atomic::PlatformOrderedLoad<byte_size, X_ACQUIRE> {
       
   405   template <typename T>
       
   406   T operator()(const volatile T* p) const {
       
   407     T t = Atomic::load(p);
       
   408     // Use twi-isync for load_acquire (faster than lwsync).
       
   409     __asm__ __volatile__ ("twi 0,%0,0\n isync\n" : : "r" (t) : "memory");
       
   410     return t;
       
   411   }
       
   412 };
       
   413 
   402 #endif // OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP
   414 #endif // OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP