Skip to content

Commit

Permalink
Fix atomic_sub_64() i386 assembly implementation
Browse files Browse the repository at this point in the history
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 <stefanrin@gmail.com>
Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5671 
Closes #5717
  • Loading branch information
behlendorf authored Feb 1, 2017
1 parent 2fe36b0 commit 3b6425c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libspl/asm-i386/atomic.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b6425c

Please sign in to comment.