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] New port for TILEPro and TILE-Gx 3/7: gcc port


Hi Joseph,

Thanks for the feedback. I am attaching a gcc patch that addresses most of the comments. Here are replies to a few of the comments:

> +#undef SYSROOT_SUFFIX_SPEC
> +#define SYSROOT_SUFFIX_SPEC "%{mbme:/usr/lib/bme;mnewlib:/usr/lib/newlib}"
> +
> +#undef SYSROOT_HEADERS_SUFFIX_SPEC
> +#define SYSROOT_HEADERS_SUFFIX_SPEC SYSROOT_SUFFIX_SPEC

These specs seem rather unusual.  Typically such specs would be generated
depending on what multilibs were being built (see t-sysroot-suffix), and
since a subdirectory sysroot itself contains directories such as usr/lib
and usr/include, you would not expect a /usr/lib path within those specs.

I've reverted the SYSROOT changes to support -mbme and -mnewlib for now.


> +#undef MCOUNT_NAME
> +#define MCOUNT_NAME "mcount"

For a new target it seems much better to define your ABI to use a name in
the reserved namespace for this - that is, starting with two underscores.

I've changed it to use "_mcount" with one underscore. That seems to be what glibc support by default, and it's consistent with x86, and we'd prefer to be consistent with x86 whenever possible.


> +/* For __clear_cache in libgcc2.c.  */
> +#ifdef IN_LIBGCC2
> +
> +#include <arch/icache.h>

Where does this header come from?  Linux kernel, glibc, somewhere else?
In general you want to condition header includes on inhibit_libc to
facilitate bootstrapping (including building a partial static libgcc)
before the libc headers are installed, since configuring glibc to install
its headers requires a working compiler to run configure tests.

We plan to include this as part of the Linux kernel, as the kernel itself depends on it.


> diff -r -u -p -N /home/packages/gcc-4.7.0-179959/gcc/config/tilegx/mul_tables.c ./gcc/config/tilegx/mul_tables.c
> --- /home/packages/gcc-4.7.0-179959/gcc/config/tilegx/mul_tables.c    1969-12-31 19:00:00.000000000 -0500
> +++ ./gcc/config/tilegx/mul_tables.c  2011-10-14 18:14:11.524757000 -0400
> @@ -0,0 +1,19853 @@

Are you really sure that this 19853-line file is source code - "the
preferred form of the work for making modifications to it"?  How was it
written?

I've included the source code from which the tables are generated, and I've updated the makefiles with rules to generate the tables. The script takes a minute to run, so I'd prefer not to generate it for every build, so I've kept the generated taables as part of the patch and updated the gcc_update script accordingly.


You should also verify that if you build the compiler using a current
trunk compiler as your starting point, it passes a
--enable-werror-always build as both C and C++

I've verified this condition using the config-list.mk script.


Thanks,

Walter

	* config.gcc: Handle tilegx and tilepro.
	* configure.ac (gcc_cv_as_dwarf2_debug_line): Enable test for
	tilegx and tilepro.
	Add HAVE_AS_TLS check for tilegx and tilepro.
	* configure: Regenerate.
	* doc/contrib.texi: Add Mat Hostetter and self.
	* doc/extend.texi (TILE-Gx Built-in Functions): New node.
	Document instruction intrinsics and network accessing intrinsics.
	(TILEPro Built-in Functions): New node.  Document instruction
	intrinsics and network accessing intrinsics.
	* doc/install.texi (Specific, tilegx-*-linux*): Document it.
	(Specific, tilepro-*-linux*): Likewise.
	* doc/invoke.texi (TILE-Gx Options): New section.
	(TILEPro Options): New section.
	* doc/md.texi (TILE-Gx): New section.
	(TILEPro): New section.
	* common/config/tilegx/tilegx-common.c: New file.
	* common/config/tilepro/tilepro-common.c: New file.
	* config/tilegx/constraints.md: New file.
	* config/tilegx/linux.h: New file.
	* config/tilegx/mul-tables.c: New file.
	* config/tilegx/predicates.md: New file.
	* config/tilegx/sync.md: New file.
	* config/tilegx/t-tilegx: New file.
	* config/tilegx/tilegx-builtins.h: New file.
	* config/tilegx/tilegx-c.c: New file.
	* config/tilegx/tilegx-generic.md: New file.
	* config/tilegx/tilegx-modes.def: New file.
	* config/tilegx/tilegx-multiply.h: New file.
	* config/tilegx/tilegx-protos.h: New file.
	* config/tilegx/tilegx.c: New file.
	* config/tilegx/tilegx.h: New file.
	* config/tilegx/tilegx.md: New file.
	* config/tilegx/tilegx.opt: New file.
	* config/tilepro/constraints.md: New file.
	* config/tilepro/gen-mul-tables.cc: New file.
	* config/tilepro/linux.h: New file.
	* config/tilepro/mul-tables.c: New file.
	* config/tilepro/predicates.md: New file.
	* config/tilepro/t-tilepro: New file.
	* config/tilepro/tilepro-builtins.h: New file.
	* config/tilepro/tilepro-c.c: New file.
	* config/tilepro/tilepro-generic.md: New file.
	* config/tilepro/tilepro-modes.def: New file.
	* config/tilepro/tilepro-multiply.h: New file.
	* config/tilepro/tilepro-protos.h: New file.
	* config/tilepro/tilepro.c: New file.
	* config/tilepro/tilepro.h: New file.
	* config/tilepro/tilepro.md: New file.
	* config/tilepro/tilepro.opt: New file.

The gcc testsuite change is the same as before.

	* testsuite/gcc.dg/20020312-2.c: Add a condition for
	__tile__.


Attachment: gcc.diff.gz
Description: GNU Zip compressed data

Attachment: gcc_testsuite.diff
Description: Text document


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