Eliminate arithmetic shifts in double-CAS (gcc/arm, msftc/x86)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 5 Oct 2012 11:10:40 +0000 (15:10 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 5 Oct 2012 14:00:23 +0000 (18:00 +0400)
commitaea70c00bc5bf83a59de1eea883f078f30d0f126
tree71d0a646368f5a3bb129dd86f9f087a8d11cf44b
parent56825146cd1e64218426e38d9a87f23913536ac2
Eliminate arithmetic shifts in double-CAS (gcc/arm, msftc/x86)

* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Make double values by setting
their AO_val1/2 parts instead of using arithmetic shifts; replace
old/new_val with old/new_w.AO_whole.
* src/atomic_ops/sysdeps/msftc/x86.h
(AO_compare_double_and_swap_double_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h
(AO_double_compare_and_swap_full): Add comment.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_double_compare_and_swap_full,
AO_compare_double_and_swap_double_full): Cast result of
_InterlockedCompareExchange64 to double_ptr_storage (to eliminate
signed/unsigned values comparison mismatch compiler warning).
src/atomic_ops/sysdeps/gcc/arm.h
src/atomic_ops/sysdeps/msftc/x86.h