This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: i686/memmove.S always copies backwards when dst > src
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Maxim Kuvyrkov <maxim at kugelworks dot com>
- Cc: Yuriy Kaminskiy <yumkam at gmail dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 7 Jan 2014 19:23:48 +0100
- Subject: Re: i686/memmove.S always copies backwards when dst > src
- Authentication-results: sourceware.org; auth=none
- References: <l97qbr$m1$1 at ger dot gmane dot org> <956CAFFD-2EA0-4AAB-BC41-94EA0D5531D4 at kugelworks dot com> <l98vji$ufi$1 at ger dot gmane dot org> <20140102201711 dot GD25179 at domone> <58050FE6-2453-41F1-B09A-1F600F1E5829 at kugelworks dot com>
On Tue, Jan 07, 2014 at 02:20:47PM +1300, Maxim Kuvyrkov wrote:
> On 3/01/2014, at 9:17 am, OndÅej BÃlka <neleai@seznam.cz> wrote:
>
> > On Mon, Dec 23, 2013 at 01:26:20PM +0400, Yuriy Kaminskiy wrote:
> ...
> >> --- glibc/sysdeps/i386/i686/memmove.S.orig
> >> +++ glibc/sysdeps/i386/i686/memmove.S
> >> @@ -63,8 +63,8 @@
> >>
> >> movl %edi, %eax
> >> subl %esi, %eax
> >> - cmpl %eax, %edi
> >> - jae 3f
> >> + cmpl %eax, %ecx
> >> + ja 3f
> >>
> >> cld
> >> shrl $1, %ecx
> >
> > Looks good. As bugfix it needs a bugzilla entry and update
> > changelog/news. Maxim could you do that?
>
> I've created BZ #16394. The attached patch was tested in i686 environment with memmove ifunc forced to resolve to implementation in sysdeps/i386/i686/memmove.S.
>
> I will check in the patch in 24 hours since at least 3 developers have looked at it and confirmed that it is the right fix.
>
> Thanks,
>
As I said above it looks correct, who else?