| OLD | NEW |
| 1 #define a_ll a_ll | 1 #define a_ll a_ll |
| 2 static inline int a_ll(volatile int* p) { | 2 static inline int a_ll(volatile int* p) { |
| 3 int v; | 3 int v; |
| 4 __asm__ __volatile__( | 4 __asm__ __volatile__( |
| 5 ".set push ; .set mips2\n\t" | 5 ".set push ; .set mips2\n\t" |
| 6 "ll %0, %1" | 6 "ll %0, %1" |
| 7 "\n\t.set pop" | 7 "\n\t.set pop" |
| 8 : "=r"(v) | 8 : "=r"(v) |
| 9 : "m"(*p)); | 9 : "m"(*p)); |
| 10 return v; | 10 return v; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 : "0"(v) | 21 : "0"(v) |
| 22 : "memory"); | 22 : "memory"); |
| 23 return r; | 23 return r; |
| 24 } | 24 } |
| 25 | 25 |
| 26 #define a_barrier a_barrier | 26 #define a_barrier a_barrier |
| 27 static inline void a_barrier() { | 27 static inline void a_barrier() { |
| 28 /* mips2 sync, but using too many directives causes | 28 /* mips2 sync, but using too many directives causes |
| 29 * gcc not to inline it, so encode with .long instead. */ | 29 * gcc not to inline it, so encode with .long instead. */ |
| 30 __asm__ __volatile__(".long 0xf" : : : "memory"); | 30 __asm__ __volatile__(".long 0xf" : : : "memory"); |
| 31 #if 0 | |
| 32 __asm__ __volatile__ ( | |
| 33 ".set push ; .set mips2 ; sync ; .set pop" | |
| 34 : : : "memory"); | |
| 35 #endif | |
| 36 } | 31 } |
| 37 | 32 |
| 38 #define a_pre_llsc a_barrier | 33 #define a_pre_llsc a_barrier |
| 39 #define a_post_llsc a_barrier | 34 #define a_post_llsc a_barrier |
| OLD | NEW |