This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] [Powerpc] tune/optimize memmove/wordcopy. Call memcpy when appropriate.
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Will Schmidt <will_schmidt at vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, willschm at us dot ibm dot com
- Date: Sun, 13 May 2012 22:21:03 +0200
- Subject: Re: [PATCH 4/4] [Powerpc] tune/optimize memmove/wordcopy. Call memcpy when appropriate.
- References: <20120403180700.5689.57731.stgit@brimstone> <20120403180820.5689.14118.stgit@brimstone>
+ /* If there is no overlap between ranges, call the builtin
memcpy. */
+ if ( (dstp >= (srcp + len)) || (srcp > (dstp + len)) )
+ return __builtin_memcpy (dest, src, len);
if (dstp - srcp >= len && srcp - dstp >= len)
Suppose dstp is -1, then your condition always evaluates to true.
Segher