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 <stefanrin@gmail.com> Reviewed-by: Gvozden Neskovic <neskovic@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #5671 Closes #5717
This commit is contained in:
parent
2094a93e87
commit
4a4c57d5ff
|
@ -507,7 +507,7 @@
|
||||||
movl 16(%esp), %ebx
|
movl 16(%esp), %ebx
|
||||||
movl 20(%esp), %ecx
|
movl 20(%esp), %ecx
|
||||||
subl %eax, %ebx
|
subl %eax, %ebx
|
||||||
adcl %edx, %ecx
|
sbbl %edx, %ecx
|
||||||
lock
|
lock
|
||||||
cmpxchg8b (%edi)
|
cmpxchg8b (%edi)
|
||||||
jne 1b
|
jne 1b
|
||||||
|
|
Loading…
Reference in New Issue