Date: Wed, 7 Aug 2013 06:34:01 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254028 - stable/9/sys/i386/i386 Message-ID: <201308070634.r776Y1li060750@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 7 06:34:01 2013 New Revision: 254028 URL: http://svnweb.freebsd.org/changeset/base/254028 Log: MFC r253328: Create a proper stack frame for i386 version of bcopy(). Modified: stable/9/sys/i386/i386/support.s Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/support.s ============================================================================== --- stable/9/sys/i386/i386/support.s Wed Aug 7 06:32:13 2013 (r254027) +++ stable/9/sys/i386/i386/support.s Wed Aug 7 06:34:01 2013 (r254028) @@ -181,11 +181,13 @@ END(bcopyb) * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ ENTRY(bcopy) + pushl %ebp + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%ecx + movl 8(%ebp),%esi + movl 12(%ebp),%edi + movl 16(%ebp),%ecx movl %edi,%eax subl %esi,%eax @@ -196,12 +198,13 @@ ENTRY(bcopy) cld /* nope, copy forwards */ rep movsl - movl 20(%esp),%ecx + movl 16(%ebp),%ecx andl $3,%ecx /* any bytes left? */ rep movsb popl %edi popl %esi + popl %ebp ret ALIGN_TEXT @@ -214,7 +217,7 @@ ENTRY(bcopy) std rep movsb - movl 20(%esp),%ecx /* copy remainder by 32-bit words */ + movl 16(%ebp),%ecx /* copy remainder by 32-bit words */ shrl $2,%ecx subl $3,%esi subl $3,%edi @@ -223,6 +226,7 @@ ENTRY(bcopy) popl %edi popl %esi cld + popl %ebp ret END(bcopy)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308070634.r776Y1li060750>