… | |
… | |
141 | #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") |
141 | #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") |
142 | #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") |
142 | #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") |
143 | #elif defined __s390__ || defined __s390x__ |
143 | #elif defined __s390__ || defined __s390x__ |
144 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") |
144 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") |
145 | #elif defined __mips__ |
145 | #elif defined __mips__ |
|
|
146 | /* GNU/Linux emulates sync on mips1 architectures, so we force it's use */ |
|
|
147 | /* anybody else who still uses mips1 is supposed to send in their version, with detection code. */ |
146 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") |
148 | #define ECB_MEMORY_FENCE __asm__ __volatile__ (".set mips2; sync; .set mips0" : : : "memory") |
147 | #elif defined __alpha__ |
149 | #elif defined __alpha__ |
148 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") |
150 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") |
149 | #elif defined __hppa__ |
151 | #elif defined __hppa__ |
150 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") |
152 | #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") |
151 | #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") |
153 | #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") |