1 #ifndef ARCH_ARM_H 2 #define ARCH_ARM_H 3 4 #define FIO_ARCH (arch_arm) 5 6 #if defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__) \ 7 || defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5E__)\ 8 || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) \ 9 || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) 10 #define nop __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t") 11 #define read_barrier() __asm__ __volatile__ ("" : : : "memory") 12 #define write_barrier() __asm__ __volatile__ ("" : : : "memory") 13 #elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_8A__) 14 #define nop __asm__ __volatile__ ("nop") 15 #define read_barrier() __sync_synchronize() 16 #define write_barrier() __sync_synchronize() 17 #endif 18 19 #endif 20