This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).


On Mon, Apr 09, 2018 at 02:31:04PM +0200, Martin Liška wrote:
> gcc/testsuite/ChangeLog:
> 
> 2018-03-28  Martin Liska  <mliska@suse.cz>
> 
> 	* gcc.dg/string-opt-1.c:

I guess you really didn't mean to keep the above entry around, just the one
below, right?

> gcc/testsuite/ChangeLog:
> 
> 2018-03-14  Martin Liska  <mliska@suse.cz>
> 
> 	* gcc.dg/string-opt-1.c: Adjust scans for i386 and glibc target
> 	and others.

> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -1607,6 +1607,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
>  	x86_64-*-linux*)
>  		tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
>  		extra_options="${extra_options} linux-android.opt"
> +		extra_objs="${extra_objs} x86-linux.o"
>  	  	;;

The should go into the i[34567]86-*-linux*) case too (outside of the
if test x$enable_targets = xall; then conditional).
Or maybe better, remove the above and do it in:
        i[34567]86-*-linux* | x86_64-*-linux*)
                extra_objs="${extra_objs} cet.o"
                tmake_file="$tmake_file i386/t-linux i386/t-cet"
                ;;
spot, just add x86-linux.o next to cet.o.

> --- a/gcc/config/i386/linux.h
> +++ b/gcc/config/i386/linux.h
> @@ -24,3 +24,5 @@ along with GCC; see the file COPYING3.  If not see
>  
>  #undef MUSL_DYNAMIC_LINKER
>  #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
> +
> +#define SUBTARGET_LIBC_FUNC_SPEED ix86_linux_libc_func_speed
> diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
> index f2d913e30ac..d855f5cc239 100644
> --- a/gcc/config/i386/linux64.h
> +++ b/gcc/config/i386/linux64.h
> @@ -37,3 +37,5 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>  #define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
>  #undef MUSL_DYNAMIC_LINKERX32
>  #define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
> +
> +#define SUBTARGET_LIBC_FUNC_SPEED ix86_linux_libc_func_speed

And the above two changes should be replaced by a change in
gcc/config/i386/linux-common.h.

> +#include "coretypes.h"
> +#include "cp/cp-tree.h" /* This is why we're a separate module.  */

Why do you need cp/cp-tree.h?  That is just too weird.
The function just uses libc_speed (in core-types.h, built_in_function
(likewise), OPTION_GLIBC (config/linux.h).

	Jakub


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