Skip to content

Commit f2ed836

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/atomic_ops: Use symbolic names
Consistently use symbolic names in all atomic ops inline assemblies. Reviewed-by: Juergen Christ <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 4a39f12 commit f2ed836

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/s390/include/asm/atomic_ops.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@ static __always_inline int __atomic_read(const atomic_t *v)
1313
int c;
1414

1515
asm volatile(
16-
" l %0,%1\n"
17-
: "=d" (c) : "R" (v->counter));
16+
" l %[c],%[counter]\n"
17+
: [c] "=d" (c) : [counter] "R" (v->counter));
1818
return c;
1919
}
2020

2121
static __always_inline void __atomic_set(atomic_t *v, int i)
2222
{
2323
asm volatile(
24-
" st %1,%0\n"
25-
: "=R" (v->counter) : "d" (i));
24+
" st %[i],%[counter]\n"
25+
: [counter] "=R" (v->counter) : [i] "d" (i));
2626
}
2727

2828
static __always_inline s64 __atomic64_read(const atomic64_t *v)
2929
{
3030
s64 c;
3131

3232
asm volatile(
33-
" lg %0,%1\n"
34-
: "=d" (c) : "RT" (v->counter));
33+
" lg %[c],%[counter]\n"
34+
: [c] "=d" (c) : [counter] "RT" (v->counter));
3535
return c;
3636
}
3737

3838
static __always_inline void __atomic64_set(atomic64_t *v, s64 i)
3939
{
4040
asm volatile(
41-
" stg %1,%0\n"
42-
: "=RT" (v->counter) : "d" (i));
41+
" stg %[i],%[counter]\n"
42+
: [counter] "=RT" (v->counter) : [i] "d" (i));
4343
}
4444

4545
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES

0 commit comments

Comments
 (0)