From 3b6425cb5bfd0fc2a14eee451ba36873318a96d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Feb 2017 09:36:47 -0800 Subject: Fix atomic_sub_64() i386 assembly implementation The atomic_sub_64() should use sbbl instead of adcl. In user space these atomics are used for statistics tracking and aren't critical which explain how this was overlooked. The kernel space implementation of these atomics are layered on the architecture specific implementations provided by the kernel. Reviewed by: Stefan Ring Reviewed-by: Gvozden Neskovic Signed-off-by: Brian Behlendorf Closes #5671 Closes #5717 --- lib/libspl/asm-i386/atomic.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libspl/asm-i386/atomic.S b/lib/libspl/asm-i386/atomic.S index d3d425090..3086d5543 100644 --- a/lib/libspl/asm-i386/atomic.S +++ b/lib/libspl/asm-i386/atomic.S @@ -507,7 +507,7 @@ movl 16(%esp), %ebx movl 20(%esp), %ecx subl %eax, %ebx - adcl %edx, %ecx + sbbl %edx, %ecx lock cmpxchg8b (%edi) jne 1b -- cgit v1.2.3