2015-11-25 18:41 GMT+03:00 Aleksandra Tsvetkova <astsv...@gmail.com>:
> gcc/testsuite/ChangeLog
> 2015-10-27  Tsvetkova Alexandra  <aleksandra.tsvetk...@intel.com>
>
>     * gcc.target/i386/mpx/memmove.c: New test for __mpx_wrapper_memmove.
>
> libmpx/ChangeLog
> 2015-10-28  Tsvetkova Alexandra  <aleksandra.tsvetk...@intel.com>
>
>     * mpxrt/Makefile.am (libmpx_la_LDFLAGS): Add -version-info option.
>     * libmpxwrap/Makefile.am (libmpx_la_LDFLAGS): Likewise + includes fixed.
>     * libmpx/Makefile.in: Regenerate.
>     * mpxrt/Makefile.in: Regenerate.
>     * libmpxwrap/Makefile.in: Regenerate.
>     * mpxrt/libtool-version: New version.
>     * libmpxwrap/libtool-version: Likewise.
>     * mpxrt/libmpx.map: Add new version and a new symbol.
>     * mpxrt/mpxrt.h: New file.
>     * mpxrt/mpxrt.c (NUM_L1_BITS): Moved to mpxrt.h.
>     (REG_IP_IDX): Moved to mpxrt.h.
>     (REX_PREFIX): Moved to mpxrt.h.
>     (XSAVE_OFFSET_IN_FPMEM): Moved to mpxrt.h.
>     (MPX_L1_SIZE): Moved to mpxrt.h.
>     * libmpxwrap/mpx_wrappers.c: (__mpx_wrapper_memmove): Rewritten.
>     (mpx_pointer): New type.
>     (mpx_bt_entry): New type.
>     (alloc_bt): New function.
>     (get_bt): New function.
>     (copy_if_possible): New function.
>     (copy_if_possible_from_end): New function.
>     (move_bounds): New function.
>
> Memmove became 2 times slower on 8 bytes. On bigger lengths (>64 bytes) it 
> became up to 3,5 times better with pointers, up to 21 times better without 
> pointers.

+  bd_type bd = get_bd ();
+  if (!(bd))
+    return;

Add explicit typecast.

+  /* No MPX or not enough bytes for the pointer,
+    therefore, not necessary to copy.  */
+  if ((n > sizeof (void *)) || (src != dst))
+    move_bounds (dst, src, n);

Comment doesn't match condition.  I believe condition should be ((n >=
sizeof (void *)) && (src != dst)).

Otherwise patch looks good. We need to make sure spec benchmark
failure is due to improved checking quality before commit it.

Thanks,
Ilya

Reply via email to