This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/16394] i686/memmove.S always copies backwards when dst > src
- From: "maxim.kuvyrkov at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 05 Jan 2014 03:23:33 +0000
- Subject: [Bug libc/16394] i686/memmove.S always copies backwards when dst > src
- Auto-submitted: auto-generated
- References: <bug-16394-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16394
Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |maxim.kuvyrkov at gmail dot com
--- Comment #1 from Maxim Kuvyrkov <maxim.kuvyrkov at gmail dot com> ---
Note that
if (dstp - srcp >= len) /* *Unsigned* compare! */
is the right way to check for whether to use forward or backward copy. We
still want to use forward copy when "dstp - srcp == len" as memory regions
don't overlap for any LEN > 0.
Your patch and the use of "ja" is correct though.
--
You are receiving this mail because:
You are on the CC list for the bug.