]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix atomic_sub_64() i386 assembly implementation
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 1 Feb 2017 17:36:47 +0000 (09:36 -0800)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2017 17:36:47 +0000 (09:36 -0800)
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

lib/libspl/asm-i386/atomic.S

index d3d425090e1c266e097a71eb10289a3eb31388bb..3086d5543949d6b438a09035151ffc8f719e4743 100644 (file)
        movl    16(%esp), %ebx
        movl    20(%esp), %ecx
        subl    %eax, %ebx
-       adcl    %edx, %ecx
+       sbbl    %edx, %ecx
        lock
        cmpxchg8b (%edi)
        jne     1b