This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/16394] i686/memmove.S always copies backwards when dst > src


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]