Hi!

On Tue, 29 Dec 2015 15:51:56 +0300, Ilya Enkovich <enkovich....@gmail.com> 
wrote:
> This patch is OK.  I applied it to trunk.
> 
> Thanks,
> Ilya
> 
> 2015-12-24 14:24 GMT+03:00 Aleksandra Tsvetkova <astsv...@gmail.com>:
> > Description:
> > 2015-12-11  Tsvetkova Alexandra  <aleksandra.tsvetk...@intel.com>
> >
> >         * libmpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): separate
> > case for size of pointer.
> >
> > On Thu, Dec 24, 2015 at 2:21 PM, Aleksandra Tsvetkova
> > <astsv...@gmail.com> wrote:
> >> This patch was tested on spec2000, spec2006 and make check. It fixes
> >> regression on vortex.
> >>
> >>
> >> 2015-12-11  Tsvetkova Alexandra  <aleksandra.tsvetk...@intel.com>
> >>
> >> * libmpxwrap/mpx_wrappers.c (mpx_pointer): New type.
> >>
> >>
> >> diff --git a/libmpx/mpxwrap/mpx_wrappers.c b/libmpx/mpxwrap/mpx_wrappers.c
> >> old mode 100644
> >> new mode 100755
> >> index ffa7e7e..679e546
> >> --- a/libmpx/mpxwrap/mpx_wrappers.c
> >> +++ b/libmpx/mpxwrap/mpx_wrappers.c
> >> @@ -483,10 +483,20 @@ __mpx_wrapper_memmove (void *dst, const void
> >> *src, size_t n)
> >>    __bnd_chk_ptr_bounds (dst, n);
> >>    __bnd_chk_ptr_bounds (src, n);
> >>
> >> +  /* This is an speedup for size of pointer.  */
> >> +  if (n == sizeof (void *))
> >> +  {
> >> +    const void **s = (const void**)src;
> >> +    void **d = (void**)dst;
> >> +    *d = *s;
> >> + return dst;
> >> +  }

I'm seeing the following compiler diagnostic:

    [...]/source-gcc/libmpx/mpxwrap/mpx_wrappers.c: In function 
'__mpx_wrapper_memmove':
    [...]/source-gcc/libmpx/mpxwrap/mpx_wrappers.c:492:8: warning: assignment 
discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
         *d = *s;
            ^


Grüße
 Thomas


> >> +
> >>    memmove (dst, src, n);
> >> +
> >>    /* Not necessary to copy bounds if size is less then size of pointer
> >>       or SRC==DST.  */
> >> -  if ((n >= sizeof (void *)) && (src != dst))
> >> +  if ((n > sizeof (void *)) && (src != dst))
> >>      move_bounds (dst, src, n);
> >>
> >>    return dst;

Attachment: signature.asc
Description: PGP signature

Reply via email to