]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/commpage/bcopy_scalar.s
xnu-1504.15.3.tar.gz
[apple/xnu.git] / osfmk / i386 / commpage / bcopy_scalar.s
index 9c078efea88f997f4eb5fcb9c63480f0c0ffa275..f87242ac6fdceaa9c6663fb2f10be2533c646203 100644 (file)
@@ -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@
  * 
          *  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)