mirror of git://gcc.gnu.org/git/gcc.git
mpx_wrappers.c (__mpx_wrapper_memmove): Special handling of one pointer copy.
libmpx/ 2015-12-29 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com> * libmpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Special handling of one pointer copy. From-SVN: r231991
This commit is contained in:
parent
8c20a15574
commit
0bf0df50e5
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-12-29 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com>
|
||||||
|
|
||||||
|
* libmpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Special
|
||||||
|
handling of one pointer copy.
|
||||||
|
|
||||||
2015-12-11 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com>
|
2015-12-11 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com>
|
||||||
|
|
||||||
* mpxrt/Makefile.am (libmpx_la_LDFLAGS): Add -version-info
|
* mpxrt/Makefile.am (libmpx_la_LDFLAGS): Add -version-info
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,18 @@ __mpx_wrapper_memmove (void *dst, const void *src, size_t n)
|
||||||
__bnd_chk_ptr_bounds (dst, n);
|
__bnd_chk_ptr_bounds (dst, n);
|
||||||
__bnd_chk_ptr_bounds (src, n);
|
__bnd_chk_ptr_bounds (src, n);
|
||||||
|
|
||||||
|
/* When we copy exactly one pointer it is faster to
|
||||||
|
just use bndldx + bndstx. */
|
||||||
|
if (n == sizeof (void *))
|
||||||
|
{
|
||||||
|
const void **s = (const void**)src;
|
||||||
|
void **d = (void**)dst;
|
||||||
|
*d = *s;
|
||||||
|
return dst;
|
||||||
|
}
|
||||||
|
|
||||||
memmove (dst, src, n);
|
memmove (dst, src, n);
|
||||||
|
|
||||||
/* Not necessary to copy bounds if size is less then size of pointer
|
/* Not necessary to copy bounds if size is less then size of pointer
|
||||||
or SRC==DST. */
|
or SRC==DST. */
|
||||||
if ((n >= sizeof (void *)) && (src != dst))
|
if ((n >= sizeof (void *)) && (src != dst))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue