]> Savannah Git Hosting - gnulib.git/commitdiff
simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Mar 2021 02:38:53 +0000 (03:38 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Mar 2021 02:38:53 +0000 (03:38 +0100)
* lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm
instruction.

ChangeLog
lib/simple-atomic.c

index 147069df160481c4c5e8ce0d46b5186567b3df2a..1003958f60524052a61fc2b30e855678bdf2899e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-18  Bruno Haible  <bruno@clisp.org>
+
+       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  <eggert@cs.ucla.edu>
 
        argmatch: fix testing typo
index 7c4f7e93259ddfc8abb588a68ff82ad18ef08765..017fb56e77b7a30d39a100d48552a381fc30bac6 100644 (file)
@@ -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"