diff --git a/lib/libspl/asm-i386/atomic.S b/lib/libspl/asm-i386/atomic.S index 7a574b0d1729..c8a6c78b5fa8 100644 --- a/lib/libspl/asm-i386/atomic.S +++ b/lib/libspl/asm-i386/atomic.S @@ -762,6 +762,7 @@ SET_SIZE(atomic_swap_32) ENTRY(atomic_swap_64) + ALTENTRY(atomic_store_64) pushl %esi pushl %ebx movl 12(%esp), %esi @@ -776,8 +777,20 @@ popl %ebx popl %esi ret + SET_SIZE(atomic_store_64) SET_SIZE(atomic_swap_64) + ENTRY(atomic_load_64) + pushl %esi + movl 8(%esp), %esi + movl %ebx, %eax + movl %ecx, %edx + lock + cmpxchg8b (%esi) + popl %esi + ret + SET_SIZE(atomic_load_64) + ENTRY(atomic_set_long_excl) movl 4(%esp), %edx movl 8(%esp), %ecx