From 2b2e2c1ca7181597631351965b7a20a01c850476 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 19 Mar 2021 03:38:53 +0100 Subject: [PATCH] simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc. * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm instruction. --- ChangeLog | 6 ++++++ lib/simple-atomic.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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" -- 2.39.5