Go to the source code of this file.
◆ PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY
| #define PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY |
◆ PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
| #define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32 |
◆ PG_HAVE_ATOMIC_FETCH_ADD_U32
| #define PG_HAVE_ATOMIC_FETCH_ADD_U32 |
◆ PG_HAVE_ATOMIC_U32_SUPPORT
| #define PG_HAVE_ATOMIC_U32_SUPPORT |
◆ pg_atomic_uint32
◆ pg_atomic_compare_exchange_u32_impl()
Definition at line 80 of file arch-ppc.h.
82{
85 bool ret;
86
87#ifdef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P
92 " sync \n"
93 " lwarx %0,0,%5,1 \n"
94 " cmpwi %0,%3 \n"
95 " bne $+12 \n"
96 " stwcx. %4,0,%5 \n"
97 " bne $-16 \n"
98 " lwsync \n"
99 " mfcr %1 \n"
102: "memory", "cc");
103 else
104#endif
106 " sync \n"
107 " lwarx %0,0,%5,1 \n"
108 " cmpw %0,%3 \n"
109 " bne $+12 \n"
110 " stwcx. %4,0,%5 \n"
111 " bne $-16 \n"
112 " lwsync \n"
113 " mfcr %1 \n"
116: "memory", "cc");
117
119 if (!ret)
121 return ret;
122}
References fb(), newval, PG_INT16_MAX, PG_INT16_MIN, and pg_atomic_uint32::value.
Referenced by pg_atomic_compare_exchange_u32().
◆ pg_atomic_fetch_add_u32_impl()
Definition at line 131 of file arch-ppc.h.
132{
135
136#ifdef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P
140 " sync \n"
141 " lwarx %1,0,%4,1 \n"
142 " addi %0,%1,%3 \n"
143 " stwcx. %0,0,%4 \n"
144 " bne $-12 \n"
145 " lwsync \n"
146:
"=&r"(
_t),
"=&b"(res),
"+m"(ptr->
value)
148: "memory", "cc");
149 else
150#endif
152 " sync \n"
153 " lwarx %1,0,%4,1 \n"
154 " add %0,%1,%3 \n"
155 " stwcx. %0,0,%4 \n"
156 " bne $-12 \n"
157 " lwsync \n"
158:
"=&r"(
_t),
"=&r"(res),
"+m"(ptr->
value)
160: "memory", "cc");
161
162 return res;
163}
References fb(), PG_INT16_MIN, and pg_atomic_uint32::value.
Referenced by pg_atomic_fetch_add_u32().