From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:42:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D4CE1BCE; Sat, 13 Jul 2013 19:42:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5B711E0B; Sat, 13 Jul 2013 19:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DJgq9R013955; Sat, 13 Jul 2013 19:42:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DJgq0C013954; Sat, 13 Jul 2013 19:42:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307131942.r6DJgq0C013954@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Jul 2013 19:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253328 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:42:52 -0000 Author: kib Date: Sat Jul 13 19:42:52 2013 New Revision: 253328 URL: http://svnweb.freebsd.org/changeset/base/253328 Log: Create a proper stack frame for i386 version of bcopy(), despite the function is leaf. The frame allows ddb to not loose the direct caller of bcopy() in backtrace. Other functions from support.s would benefit from the same change as well, but for now bcopy() is the most frequent offender. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/support.s Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Sat Jul 13 19:36:18 2013 (r253327) +++ head/sys/i386/i386/support.s Sat Jul 13 19:42:52 2013 (r253328) @@ -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)