Skip to content

Commit a754486

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: Cleanup atomic1 implementation
1 parent a8b97c3 commit a754486

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

gcc/config/arc64/atomic.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
;; <http://www.gnu.org/licenses/>.
1919

2020
;; 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])
2222

2323
(define_expand "memory_barrier"
2424
[(set (match_dup 0)
@@ -134,10 +134,10 @@
134134
(set_attr "predicable" "no")
135135
(set_attr "length" "*")])
136136

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
141141
(match_operand:SI 2 "const_int_operand" "")] ;; model
142142
"ARC64_HAS_ATOMIC_1"
143143
{
@@ -160,8 +160,8 @@
160160
(define_expand "atomic_fetch_<optab><mode>"
161161
[(match_operand:GPI 0 "register_operand" "") ;; output
162162
(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
165165
(match_operand:SI 3 "const_int_operand" "")] ;; model
166166
"ARC64_HAS_ATOMIC_1"
167167
{
@@ -174,7 +174,7 @@
174174
[(match_operand:GPI 0 "register_operand" "") ;; output
175175
(match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
176176
(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
178178
"ARC64_HAS_ATOMIC_1"
179179
{
180180
arc64_expand_atomic_op (NOT, operands[1], operands[2],
@@ -185,9 +185,9 @@
185185
(define_expand "atomic_<optab>_fetch<mode>"
186186
[(match_operand:GPI 0 "register_operand" "") ;; output
187187
(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
191191
"ARC64_HAS_ATOMIC_1"
192192
{
193193
arc64_expand_atomic_op (<CODE>, operands[1], operands[2],
@@ -199,7 +199,7 @@
199199
[(match_operand:GPI 0 "register_operand" "") ;; output
200200
(match_operand:GPI 1 "mem_noofs_operand" "") ;; memory
201201
(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
203203
"ARC64_HAS_ATOMIC_1"
204204
{
205205
arc64_expand_atomic_op (NOT, operands[1], operands[2],

0 commit comments

Comments
 (0)