From: Bruno Haible Date: Fri, 19 Mar 2021 02:38:53 +0000 (+0100) Subject: simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc. X-Git-Tag: v1.0~3024 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2b2e2c1ca7181597631351965b7a20a01c850476;p=gnulib.git simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc. * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm instruction. --- diff --git a/ChangeLog b/ChangeLog index 147069df16..1003958f60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-03-18 Bruno Haible + + simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc. + * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm + instruction. + 2021-03-18 Paul Eggert argmatch: fix testing typo diff --git a/lib/simple-atomic.c b/lib/simple-atomic.c index 7c4f7e9325..017fb56e77 100644 --- a/lib/simple-atomic.c +++ b/lib/simple-atomic.c @@ -277,7 +277,7 @@ atomic_compare_and_swap_ptr (uintptr_t volatile *vp, return oldval; # else /* __SUNPRO_C */ # if defined __x86_64__ - asm (" movl %rsi,%rax\n" + asm (" movq %rsi,%rax\n" " lock\n cmpxchgq %rdx,(%rdi)"); # elif defined __i386 asm (" movl 16(%ebp),%ecx\n"