X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..eb1cde05bb040f65c511ae4fa854abf1628afdf2:/i386/sys/OSAtomic.s?ds=sidebyside diff --git a/i386/sys/OSAtomic.s b/i386/sys/OSAtomic.s index f43b40b..c6dd151 100644 --- a/i386/sys/OSAtomic.s +++ b/i386/sys/OSAtomic.s @@ -117,6 +117,11 @@ DECLARE(_OSAtomicAdd64) DECLARE(_OSAtomicTestAndSet) movl 4(%esp), %eax movl 8(%esp), %edx + movl %eax, %ecx + andl $-8, %ecx + notl %eax + andl $7, %eax + orl %ecx, %eax call *_COMM_PAGE_BTS setc %al ret @@ -124,6 +129,11 @@ DECLARE(_OSAtomicTestAndSet) DECLARE(_OSAtomicTestAndClear) movl 4(%esp), %eax movl 8(%esp), %edx + movl %eax, %ecx + andl $-8, %ecx + notl %eax + andl $7, %eax + orl %ecx, %eax call *_COMM_PAGE_BTC setc %al ret