X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/osfmk/i386/commpage/bcopy_scalar.s diff --git a/osfmk/i386/commpage/bcopy_scalar.s b/osfmk/i386/commpage/bcopy_scalar.s index 9c078efea..f87242ac6 100644 --- a/osfmk/i386/commpage/bcopy_scalar.s +++ b/osfmk/i386/commpage/bcopy_scalar.s @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2003-2006 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -71,27 +71,29 @@ * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ -.text -.align 5, 0x90 -Lbcopy_scalar: +COMMPAGE_FUNCTION_START(bcopy_scalar, 32, 5) + pushl %ebp /* set up a frame for backtraces */ + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi + movl 8(%ebp),%esi + movl 12(%ebp),%edi jmp 1f /* -** These need to be 32 bytes from Lbcopy_scalar -*/ -.align 5, 0x90 + * These need to be 32 bytes from Lbcopy_scalar + */ + .align 5, 0x90 Lmemcpy_scalar: Lmemmove_scalar: + pushl %ebp /* set up a frame for backtraces */ + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%edi - movl 16(%esp),%esi + movl 8(%ebp),%edi + movl 12(%ebp),%esi movl %edi,%eax 1: - movl 20(%esp),%ecx + movl 16(%ebp),%ecx movl %edi,%edx subl %esi,%edx cmpl %ecx,%edx /* overlapping? */ @@ -107,6 +109,7 @@ Lmemmove_scalar: movsb popl %edi popl %esi + popl %ebp ret 2: addl %ecx,%edi /* copy backwards. */ @@ -126,7 +129,8 @@ Lmemmove_scalar: movsl popl %edi popl %esi + popl %ebp cld ret - COMMPAGE_DESCRIPTOR(bcopy_scalar,_COMM_PAGE_BCOPY,0,0) +COMMPAGE_DESCRIPTOR(bcopy_scalar,_COMM_PAGE_BCOPY,0,kHasSSE2+kHasSupplementalSSE3)