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 <[email protected]>
Reviewed-by: Gvozden Neskovic <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5671
Closes openzfs#5717
  • Loading branch information
behlendorf authored and tonyhutter committed May 17, 2017
1 parent ef1ac6d commit 88d9a60
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 88d9a60

Please sign in to comment.