From: Matthew Dillon Date: Sat, 3 Apr 2004 08:21:16 +0000 (+0000) Subject: Create a normal stack frame in generic_bcopy() to aid debugging, so X-Git-Tag: v2.0.1~11593 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/6f381f08e0379676f02d80b4f80aa2af0ac9ba71 Create a normal stack frame in generic_bcopy() to aid debugging, so backtraces work properly. --- diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 4940095349..b25fd7a8a8 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/support.s,v 1.67.2.5 2001/08/15 01:23:50 peter Exp $ - * $DragonFly: src/sys/i386/i386/Attic/support.s,v 1.9 2003/08/07 21:17:22 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/support.s,v 1.10 2004/04/03 08:21:16 dillon Exp $ */ #include "use_npx.h" @@ -440,11 +440,13 @@ ENTRY(ovbcopy) * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ ENTRY(generic_bcopy) + pushl %ebp /* debugging */ + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%ecx + movl 16(%esp),%esi + movl 20(%esp),%edi + movl 24(%esp),%ecx movl %edi,%eax subl %esi,%eax @@ -455,12 +457,13 @@ ENTRY(generic_bcopy) cld /* nope, copy forwards */ rep movsl - movl 20(%esp),%ecx + movl 24(%esp),%ecx andl $3,%ecx /* any bytes left? */ rep movsb popl %edi popl %esi + popl %ebp ret ALIGN_TEXT @@ -473,7 +476,7 @@ ENTRY(generic_bcopy) std rep movsb - movl 20(%esp),%ecx /* copy remainder by 32-bit words */ + movl 24(%esp),%ecx /* copy remainder by 32-bit words */ shrl $2,%ecx subl $3,%esi subl $3,%edi @@ -481,6 +484,7 @@ ENTRY(generic_bcopy) movsl popl %edi popl %esi + popl %ebp cld ret diff --git a/sys/platform/pc32/i386/support.s b/sys/platform/pc32/i386/support.s index bb4a5148d3..452f7d6c94 100644 --- a/sys/platform/pc32/i386/support.s +++ b/sys/platform/pc32/i386/support.s @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/support.s,v 1.67.2.5 2001/08/15 01:23:50 peter Exp $ - * $DragonFly: src/sys/platform/pc32/i386/support.s,v 1.9 2003/08/07 21:17:22 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/support.s,v 1.10 2004/04/03 08:21:16 dillon Exp $ */ #include "use_npx.h" @@ -440,11 +440,13 @@ ENTRY(ovbcopy) * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ ENTRY(generic_bcopy) + pushl %ebp /* debugging */ + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%ecx + movl 16(%esp),%esi + movl 20(%esp),%edi + movl 24(%esp),%ecx movl %edi,%eax subl %esi,%eax @@ -455,12 +457,13 @@ ENTRY(generic_bcopy) cld /* nope, copy forwards */ rep movsl - movl 20(%esp),%ecx + movl 24(%esp),%ecx andl $3,%ecx /* any bytes left? */ rep movsb popl %edi popl %esi + popl %ebp ret ALIGN_TEXT @@ -473,7 +476,7 @@ ENTRY(generic_bcopy) std rep movsb - movl 20(%esp),%ecx /* copy remainder by 32-bit words */ + movl 24(%esp),%ecx /* copy remainder by 32-bit words */ shrl $2,%ecx subl $3,%esi subl $3,%edi @@ -481,6 +484,7 @@ ENTRY(generic_bcopy) movsl popl %edi popl %esi + popl %ebp cld ret