Patchwork New port resubmission for TILEPro and TILE-Gx 3/6: gcc port

login
register
mail settings
Submitter Walter Lee
Date Dec. 31, 2011, 12:42 a.m.
Message ID <4EFE5A7F.3010104@tilera.com>
Download mbox | patch
Permalink /patch/133707/
State New
Headers show

Comments

Walter Lee - Dec. 31, 2011, 12:42 a.m.
Here is the gcc port.

2011-12-30  Walter Lee <walt@tilera.com>
	
	* 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.

Here are changes to the gcc testsuite.

2011-12-30  Walter Lee <walt@tilera.com>
	
        * g++.dg/other/PR23205.C: Disable test on tile.
        * g++.dg/other/pr23205-2.C: Disable test on tile.
	* gcc.dg/20020312-2.c: Add a condition for
	__tile__.
        * gcc.dg/20040813-1.c: Disable test on tile.
        * gcc.dg/lower-subreg-1.c: Disable test on tilegx.
        * gcc.misc-tests/linkage.exp: Handle tilegx.

Patch

diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/g++.dg/other/PR23205.C ./gcc/testsuite/g++.dg/other/PR23205.C
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/g++.dg/other/PR23205.C	2011-10-14 00:59:02.000000000 -0400
+++ ./gcc/testsuite/g++.dg/other/PR23205.C	2011-12-29 22:06:47.735928000 -0500
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks } { "*" } { "" } } */
 /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types" } */
 
 const int foobar = 4;
diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/g++.dg/other/pr23205-2.C ./gcc/testsuite/g++.dg/other/pr23205-2.C
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/g++.dg/other/pr23205-2.C	2011-10-14 00:59:02.000000000 -0400
+++ ./gcc/testsuite/g++.dg/other/pr23205-2.C	2011-12-29 22:06:47.752936000 -0500
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* } { "*" } { "" } } */
 /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */
 
 const int foobar = 4;
diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/20020312-2.c ./gcc/testsuite/gcc.dg/20020312-2.c
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/20020312-2.c	2011-12-08 13:44:18.000000000 -0500
+++ ./gcc/testsuite/gcc.dg/20020312-2.c	2011-12-29 22:06:47.267933000 -0500
@@ -66,6 +66,8 @@  extern void abort (void);
 # define PIC_REG  "12"
 #elif defined(__sparc__)
 # define PIC_REG  "l7"
+#elif defined(__tile__)
+# define PIC_REG "r51"
 #elif defined(__TMS320C6X__)
 # define PIC_REG "B14"
 #elif defined(__v850)
diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/20040813-1.c ./gcc/testsuite/gcc.dg/20040813-1.c
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/20040813-1.c	2011-10-14 00:57:20.000000000 -0400
+++ ./gcc/testsuite/gcc.dg/20040813-1.c	2011-12-29 22:06:47.706950000 -0500
@@ -2,7 +2,7 @@ 
 /* Contributed by Devang Patel  <dpatel@apple.com>  */
 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks* } { "*" } { "" } } */
 /* { dg-options "-gstabs" } */
 
 int
diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/lower-subreg-1.c ./gcc/testsuite/gcc.dg/lower-subreg-1.c
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.dg/lower-subreg-1.c	2011-10-14 00:57:23.000000000 -0400
+++ ./gcc/testsuite/gcc.dg/lower-subreg-1.c	2011-12-29 22:06:47.717979000 -0500
@@ -1,4 +1,4 @@ 
-/* { dg-do compile { target { { { ! mips64 } && { ! ia64-*-* } } && { ! spu-*-* } } } } */
+/* { dg-do compile { target { { { ! mips64 } && { ! ia64-*-* } } && { ! spu-*-* } && { ! tilegx-*-* } } } } */
 /* { dg-options "-O -fdump-rtl-subreg1" } */
 /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && x32 } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
diff -r -u -p -N /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.misc-tests/linkage.exp ./gcc/testsuite/gcc.misc-tests/linkage.exp
--- /home/packages/gcc-4.7.0-182680/gcc/testsuite/gcc.misc-tests/linkage.exp	2011-10-14 00:57:53.000000000 -0400
+++ ./gcc/testsuite/gcc.misc-tests/linkage.exp	2011-12-29 22:06:47.726919000 -0500
@@ -88,6 +88,13 @@  if { [isnative] && ![is_remote host] } t
             } elseif [ string match "*ppc" $file_string ] {
                 set native_cflags "-m32"
             }
+        } elseif [istarget "tilegx-*-linux*"] {
+	    set file_string [exec file "linkage-x.o"]
+	    if [ string match "*64-bit*" $file_string ] {
+		set native_cflags "-m64"
+	    } elseif [ string match "*32-bit*" $file_string ] {
+		set native_cflags "-m32"
+	    }
         } elseif [istarget "*86*-*-darwin*"] {
 	   set file_string [exec file "linkage-x.o"]
 	   if [ string match "*64*" $file_string ] {