Skip to content

Commit 149c077

Browse files
committed
amd64/atomic: silence warnings
Solaris Studio compilers issue (tons of) warnings because one arguments of several __asm__ __volatile__ section is not needed
1 parent ef3ee02 commit 149c077

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

opal/include/opal/sys/amd64/atomic.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserverd.
1414
* Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights
1515
* reserved.
16+
* Copyright (c) 2016 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -159,7 +161,7 @@ static inline int32_t opal_atomic_swap_32( volatile int32_t *addr,
159161

160162
__asm__ __volatile__("xchg %1, %0" :
161163
"=r" (oldval), "=m" (*addr) :
162-
"0" (newval), "m" (*addr) :
164+
"0" (newval) :
163165
"memory");
164166
return oldval;
165167
}
@@ -204,7 +206,7 @@ static inline int32_t opal_atomic_add_32(volatile int32_t* v, int i)
204206
__asm__ __volatile__(
205207
SMPLOCK "xaddl %1,%0"
206208
:"=m" (*v), "+r" (ret)
207-
:"m" (*v)
209+
:
208210
:"memory", "cc"
209211
);
210212
return (ret+i);
@@ -225,7 +227,7 @@ static inline int64_t opal_atomic_add_64(volatile int64_t* v, int64_t i)
225227
__asm__ __volatile__(
226228
SMPLOCK "xaddq %1,%0"
227229
:"=m" (*v), "+r" (ret)
228-
:"m" (*v)
230+
:
229231
:"memory", "cc"
230232
);
231233
return (ret+i);
@@ -246,7 +248,7 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int i)
246248
__asm__ __volatile__(
247249
SMPLOCK "xaddl %1,%0"
248250
:"=m" (*v), "+r" (ret)
249-
:"m" (*v)
251+
:
250252
:"memory", "cc"
251253
);
252254
return (ret-i);
@@ -267,7 +269,7 @@ static inline int64_t opal_atomic_sub_64(volatile int64_t* v, int64_t i)
267269
__asm__ __volatile__(
268270
SMPLOCK "xaddq %1,%0"
269271
:"=m" (*v), "+r" (ret)
270-
:"m" (*v)
272+
:
271273
:"memory", "cc"
272274
);
273275
return (ret-i);

0 commit comments

Comments
 (0)