|
18 | 18 | ;; <http://www.gnu.org/licenses/>.
|
19 | 19 |
|
20 | 20 | ;; Operations which can be used with atomic loads and stores.
|
21 |
| -(define_code_iterator ATOMICOP [plus minus ior xor and]) |
| 21 | +(define_code_iterator ATOPS [plus minus ior xor and]) |
22 | 22 |
|
23 | 23 | (define_expand "memory_barrier"
|
24 | 24 | [(set (match_dup 0)
|
|
134 | 134 | (set_attr "predicable" "no")
|
135 | 135 | (set_attr "length" "*")])
|
136 | 136 |
|
137 |
| -(define_expand "atomic_<optab>si" |
138 |
| - [(match_operand:SI 0 "mem_noofs_operand" "") ;; memory |
139 |
| - (ATOMICOP:SI (match_dup 0) |
140 |
| - (match_operand:SI 1 "register_operand" "")) ;; operand |
| 137 | +(define_expand "atomic_<optab><mode>" |
| 138 | + [(match_operand:GPI 0 "mem_noofs_operand" "") ;; memory |
| 139 | + (ATOPS:GPI (match_dup 0) |
| 140 | + (match_operand:GPI 1 "register_operand" "")) ;; operand |
141 | 141 | (match_operand:SI 2 "const_int_operand" "")] ;; model
|
142 | 142 | "ARC64_HAS_ATOMIC_1"
|
143 | 143 | {
|
|
160 | 160 | (define_expand "atomic_fetch_<optab><mode>"
|
161 | 161 | [(match_operand:GPI 0 "register_operand" "") ;; output
|
162 | 162 | (match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
|
163 |
| - (ATOMICOP:SI (match_dup 1) |
164 |
| - (match_operand:GPI 2 "register_operand" "")) ;; operand |
| 163 | + (ATOPS:GPI (match_dup 1) |
| 164 | + (match_operand:GPI 2 "register_operand" "")) ;; operand |
165 | 165 | (match_operand:SI 3 "const_int_operand" "")] ;; model
|
166 | 166 | "ARC64_HAS_ATOMIC_1"
|
167 | 167 | {
|
|
174 | 174 | [(match_operand:GPI 0 "register_operand" "") ;; output
|
175 | 175 | (match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
|
176 | 176 | (match_operand:GPI 2 "register_operand" "") ;; operand
|
177 |
| - (match_operand:GPI 3 "const_int_operand" "")] ;; model |
| 177 | + (match_operand:SI 3 "const_int_operand" "")] ;; model |
178 | 178 | "ARC64_HAS_ATOMIC_1"
|
179 | 179 | {
|
180 | 180 | arc64_expand_atomic_op (NOT, operands[1], operands[2],
|
|
185 | 185 | (define_expand "atomic_<optab>_fetch<mode>"
|
186 | 186 | [(match_operand:GPI 0 "register_operand" "") ;; output
|
187 | 187 | (match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
|
188 |
| - (ATOMICOP:GPI (match_dup 1) |
189 |
| - (match_operand:GPI 2 "register_operand" "")) ;; operand |
190 |
| - (match_operand:GPI 3 "const_int_operand" "")] ;; model |
| 188 | + (ATOPS:GPI (match_dup 1) |
| 189 | + (match_operand:GPI 2 "register_operand" "")) ;; operand |
| 190 | + (match_operand:SI 3 "const_int_operand" "")] ;; model |
191 | 191 | "ARC64_HAS_ATOMIC_1"
|
192 | 192 | {
|
193 | 193 | arc64_expand_atomic_op (<CODE>, operands[1], operands[2],
|
|
199 | 199 | [(match_operand:GPI 0 "register_operand" "") ;; output
|
200 | 200 | (match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
|
201 | 201 | (match_operand:GPI 2 "register_operand" "") ;; operand
|
202 |
| - (match_operand:GPI 3 "const_int_operand" "")] ;; model |
| 202 | + (match_operand:SI 3 "const_int_operand" "")] ;; model |
203 | 203 | "ARC64_HAS_ATOMIC_1"
|
204 | 204 | {
|
205 | 205 | arc64_expand_atomic_op (NOT, operands[1], operands[2],
|
|
0 commit comments