summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-02-01 09:36:47 -0800
committerTony Hutter <[email protected]>2017-06-09 14:05:15 -0700
commit4a4c57d5ff1ba1611483f0463591e1b241709f9c (patch)
treef09a8b8d99e764e829dcbefc0533b629f2bc61b0 /lib
parent2094a93e87a8b8a21c217245ef733c509c9898cf (diff)
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 <[email protected]> Reviewed-by: Gvozden Neskovic <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5671 Closes #5717
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/asm-i386/atomic.S2
1 files changed, 1 insertions, 1 deletions
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