public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/3] Rename various powerpcspe port files
  2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
  2017-05-15 20:52 ` [PATCH 1/3] Copy rs6000/ to powerpcspe/ Segher Boessenkool
@ 2017-05-15 20:52 ` Segher Boessenkool
  2017-05-15 20:54 ` [PATCH 3/3] Actual adjustments to make powerpcspe work Segher Boessenkool
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-15 20:52 UTC (permalink / raw)
  To: gcc-patches
  Cc: Segher Boessenkool, David Edelsohn, Andrew Jenner,
	Arnaud Charlet, Joel Brobecker, Joel Sherrill, Joseph Myers,
	Olivier Hainque, Sandra Loosemore

This is also not a real patch, it is the result of this sh script:

  mv gcc/common/config/powerpcspe/{rs6000,powerpcspe}-common.c
  mv gcc/config/powerpcspe/driver-{rs6000,powerpcspe}.c
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-builtin.def
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-c.c
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-cpus.def
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-linux.c
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-modes.def
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-opts.h
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-passes.def
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-protos.h
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}-tables.opt
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}.c
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}.h
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}.md
  mv gcc/config/powerpcspe/{rs6000,powerpcspe}.opt
  mv gcc/config/powerpcspe/t-{rs6000,powerpcspe}
  mv gcc/config/powerpcspe/x-{rs6000,powerpcspe}


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 0/3] Split off powerpcspe from rs6000 port
@ 2017-05-15 20:52 Segher Boessenkool
  2017-05-15 20:52 ` [PATCH 1/3] Copy rs6000/ to powerpcspe/ Segher Boessenkool
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-15 20:52 UTC (permalink / raw)
  To: gcc-patches
  Cc: Segher Boessenkool, David Edelsohn, Andrew Jenner,
	Arnaud Charlet, Joel Brobecker, Joel Sherrill, Joseph Myers,
	Olivier Hainque, Sandra Loosemore

Hi!

As discussed before, here is a series to split powerpcspe from the
rs6000 port.  This series does not yet make any real changes to either
port: it is a copy of rs6000/ to powerpcspe/, with some renames and
some necessary changes to the port file, and slightly more involved
changes to config.gcc .

This was tested on powerpc64-linux {-m32,-m64}, and it was build-tested
on powerpc-linux-gnuspe (and the resulting compiler was tested to be
functional: it can build various Linux defconfigs for SPE systems).

I have tried to see how much the powerpcspe port can be simplified
after this, and found it can lose 80% of the code without big problems.
You may however not want all that, for example, I removed all 64-bit
support in that test.  Getting rid of all VMX/VSX support is a big part
of it already, as is removing "classic" floating point (and paired
single, and xilinx fpu, and all newer ISA features, etc.)

For the rs6000 port the low-hanging fruits are much more modest, only
5% or a bit more; but in pretty gnarly code.  For example, some current
pain points are the SPE ABI (for separate shrink-wrapping), and how
isel is handled.

This won't be the final series...  I have a few questions:

-- This uses powerpc-*-rtems*spe*; do we want powerpcspe-*-rtems*
   instead?  Or both?
-- This uses powerpc-wrs-vxworksspe; do we want powerpcspe-wrs-vxworks
   instead?  Both?  What about the ae and mils variants?
-- Does powerpc*-*-freebsd*spe* exist?
-- Does powerpc-*-netbsd*spe* exist?
-- Does powerpc-*-eabisim*spe* exist?
-- Does powerpcle-*-*spe* exist?

Also, testing is needed :-)  You can get better testing by removing
the rs6000/ directories completely, btw.; otherwise files from rs6000/
can accidentally be picked up instead of the corresponfing file from
powerpcspe/, which will currently work because there are no big
differences yet, but things will diverge later (and then break).


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] Copy rs6000/ to powerpcspe/
  2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
@ 2017-05-15 20:52 ` Segher Boessenkool
  2017-05-15 20:52 ` [PATCH 2/3] Rename various powerpcspe port files Segher Boessenkool
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-15 20:52 UTC (permalink / raw)
  To: gcc-patches
  Cc: Segher Boessenkool, David Edelsohn, Andrew Jenner,
	Arnaud Charlet, Joel Brobecker, Joel Sherrill, Joseph Myers,
	Olivier Hainque, Sandra Loosemore

This is not a real patch, it is the result of this sh script:

  cp -R gcc/common/config/{rs6000,powerpcspe}
  cp -R gcc/config/{rs6000,powerpcspe}


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] Actual adjustments to make powerpcspe work
  2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
  2017-05-15 20:52 ` [PATCH 1/3] Copy rs6000/ to powerpcspe/ Segher Boessenkool
  2017-05-15 20:52 ` [PATCH 2/3] Rename various powerpcspe port files Segher Boessenkool
@ 2017-05-15 20:54 ` Segher Boessenkool
  2017-05-17  5:53 ` [PATCH 0/3] Split off powerpcspe from rs6000 port Sebastian Huber
  2017-05-18 16:48 ` Segher Boessenkool
  4 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-15 20:54 UTC (permalink / raw)
  To: gcc-patches
  Cc: Segher Boessenkool, David Edelsohn, Andrew Jenner,
	Arnaud Charlet, Joel Brobecker, Joel Sherrill, Joseph Myers,
	Olivier Hainque, Sandra Loosemore

This is tested with powerpc-linux-gnuspe.  The other subtargets are
meant to work as well, but no doubt something is still broken.  I also
do not know if the port _actually_ works.

The main changes are to config.gcc; the rest is mostly filename
renames.  See the cover letter for what testing is still needed.

Cheers,


Segher

---
 gcc/config.gcc                              | 49 ++++++++++++++---
 gcc/config.host                             |  4 ++
 gcc/config/powerpcspe/genopt.sh             |  6 +--
 gcc/config/powerpcspe/powerpcspe-tables.opt |  2 +-
 gcc/config/powerpcspe/powerpcspe.c          | 36 ++++++-------
 gcc/config/powerpcspe/powerpcspe.h          | 12 ++---
 gcc/config/powerpcspe/powerpcspe.opt        |  2 +-
 gcc/config/powerpcspe/t-linux               |  2 +-
 gcc/config/powerpcspe/t-linux64             |  2 +-
 gcc/config/powerpcspe/t-powerpcspe          | 82 ++++++++++++++---------------
 gcc/config/powerpcspe/x-darwin              |  2 +-
 gcc/config/powerpcspe/x-darwin64            |  2 +-
 gcc/config/powerpcspe/x-powerpcspe          |  2 +-
 13 files changed, 120 insertions(+), 83 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index e8aaf2d..95d01d1 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -442,6 +442,16 @@ nios2-*-*)
 nvptx-*-*)
 	cpu_type=nvptx
 	;;
+powerpc*-*-*spe*)
+	cpu_type=powerpcspe
+	extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
+	case x$with_cpu in
+	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
+		cpu_is_64bit=yes
+		;;
+	esac
+	extra_options="${extra_options} g.opt fused-madd.opt powerpcspe/powerpcspe-tables.opt"
+	;;
 powerpc*-*-*)
 	cpu_type=rs6000
 	extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
@@ -2369,9 +2379,9 @@ powerpc-*-netbsd*)
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	;;
 powerpc-*-eabispe*)
-	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
-	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-spe rs6000/t-ppccomm"
+	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h ${cpu_type}/sysv4.h ${cpu_type}/eabi.h ${cpu_type}/e500.h ${cpu_type}/eabispe.h"
+	extra_options="${extra_options} ${cpu_type}/sysv4.opt"
+	tmake_file="${cpu_type}/t-spe ${cpu_type}/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-eabisimaltivec*)
@@ -2409,11 +2419,27 @@ powerpc-*-eabi*)
 	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
+powerpc-*-rtems*spe*)
+	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h powerpcspe/sysv4.h powerpcspe/eabi.h powerpcspe/e500.h powerpcspe/rtems.h rtems.h"
+	extra_options="${extra_options} powerpcspe/sysv4.opt"
+	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-rtems powerpcspe/t-ppccomm"
+	;;
 powerpc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
+powerpc*-*-linux*spe*)
+	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h powerpcspe/sysv4.h"
+	extra_options="${extra_options} powerpcspe/sysv4.opt"
+	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-ppccomm"
+	extra_objs="$extra_objs powerpcspe-linux.o"
+	maybe_biarch=
+	tm_file="${tm_file} powerpcspe/linux.h glibc-stdint.h"
+	tmake_file="${tmake_file} powerpcspe/t-ppcos powerpcspe/t-linux"
+	tm_file="${tm_file} powerpcspe/linuxspe.h powerpcspe/e500.h"
+	default_gnu_indirect_function=yes
+	;;
 powerpc*-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
@@ -2501,6 +2527,13 @@ powerpc*-*-linux*)
 		    ;;
 	esac
 	;;
+powerpc-wrs-vxworksspe)
+	tm_file="${tm_file} elfos.h freebsd-spec.h powerpcspe/sysv4.h"
+	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-ppccomm powerpcspe/t-vxworks"
+	extra_options="${extra_options} powerpcspe/sysv4.opt"
+	extra_headers=ppc-asm.h
+	tm_file="${tm_file} vx-common.h vxworks.h powerpcspe/vxworks.h powerpcspe/e500.h"
+	;;
 powerpc-wrs-vxworks|powerpc-wrs-vxworksae|powerpc-wrs-vxworksmils)
 	tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
@@ -3057,7 +3090,7 @@ i[34567]86-*-* | x86_64-*-*)
 	tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
 	;;
 powerpc*-*-* | rs6000-*-*)
-	tm_file="${tm_file} rs6000/option-defaults.h"
+	tm_file="${tm_file} ${cpu_type}/option-defaults.h"
 esac
 
 # Build mkoffload tool
@@ -4551,10 +4584,10 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file=rs6000/rs6000.c
-		c_target_objs="${c_target_objs} rs6000-c.o"
-		cxx_target_objs="${cxx_target_objs} rs6000-c.o"
-		tmake_file="rs6000/t-rs6000 ${tmake_file}"
+		out_file="${cpu_type}/${cpu_type}.c"
+		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
+		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
+		tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
 		;;
 
 	sh[123456ble]*-*-* | sh-*-*)
diff --git a/gcc/config.host b/gcc/config.host
index 5e2db53..48120ae 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -144,6 +144,10 @@ case ${host} in
   rs6000-*-* \
   | powerpc*-*-* )
     case ${target} in
+      powerpc*-*-*spe*)
+        host_extra_gcc_objs="driver-powerpcspe.o"
+        host_xmake_file="${host_xmake_file} powerpcspe/x-powerpcspe"
+        ;;
       rs6000-*-* \
       | powerpc*-*-* )
         host_extra_gcc_objs="driver-rs6000.o"
diff --git a/gcc/config/powerpcspe/genopt.sh b/gcc/config/powerpcspe/genopt.sh
index 1e0a79e..f04c001 100755
--- a/gcc/config/powerpcspe/genopt.sh
+++ b/gcc/config/powerpcspe/genopt.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Generate rs6000-tables.opt from the list of CPUs in rs6000-cpus.def.
+# Generate powerpcspe-tables.opt from the list of CPUs in powerpcspe-cpus.def.
 # Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
@@ -20,7 +20,7 @@
 
 cat <<EOF
 ; -*- buffer-read-only: t -*-
-; Generated automatically by genopt.sh from rs6000-cpus.def.
+; Generated automatically by genopt.sh from powerpcspe-cpus.def.
 
 ; Copyright (C) 2011-2017 Free Software Foundation, Inc.
 ;
@@ -61,4 +61,4 @@ BEGIN {
     print "Enum(rs6000_cpu_opt_value) String(" name ") Value(" value ")"
     print ""
     value++
-}' $1/rs6000-cpus.def
+}' $1/powerpcspe-cpus.def
diff --git a/gcc/config/powerpcspe/powerpcspe-tables.opt b/gcc/config/powerpcspe/powerpcspe-tables.opt
index cc9e584..2ae74f4 100644
--- a/gcc/config/powerpcspe/powerpcspe-tables.opt
+++ b/gcc/config/powerpcspe/powerpcspe-tables.opt
@@ -1,5 +1,5 @@
 ; -*- buffer-read-only: t -*-
-; Generated automatically by genopt.sh from rs6000-cpus.def.
+; Generated automatically by genopt.sh from powerpcspe-cpus.def.
 
 ; Copyright (C) 2011-2017 Free Software Foundation, Inc.
 ;
diff --git a/gcc/config/powerpcspe/powerpcspe.c b/gcc/config/powerpcspe/powerpcspe.c
index 17b93a6..b0ff6f9 100644
--- a/gcc/config/powerpcspe/powerpcspe.c
+++ b/gcc/config/powerpcspe/powerpcspe.c
@@ -182,7 +182,7 @@ int dot_symbols;
 /* Specify the machine mode that pointers have.  After generation of rtl, the
    compiler makes no further distinction between pointers and any other objects
    of this machine mode.  The type is unsigned since not all things that
-   include rs6000.h also include machmode.h.  */
+   include powerpcspe.h also include machmode.h.  */
 unsigned rs6000_pmode;
 
 /* Width in bits of a pointer.  */
@@ -391,9 +391,9 @@ const char *tcb_verification_symbol = "__parse_hwcap_and_convert_at_platform";
 /* True if we have expanded a CPU builtin.  */
 bool cpu_builtin_p;
 
-/* Pointer to function (in rs6000-c.c) that can define or undefine target
+/* Pointer to function (in powerpcspe-c.c) that can define or undefine target
    macros that have changed.  Languages that don't support the preprocessor
-   don't link in rs6000-c.c, so we can't call it directly.  */
+   don't link in powerpcspe-c.c, so we can't call it directly.  */
 void (*rs6000_target_modify_macros_ptr) (bool, HOST_WIDE_INT, HOST_WIDE_INT);
 
 /* Simplfy register classes into simpler classifications.  We assume
@@ -1297,7 +1297,7 @@ struct rs6000_builtin_info_type {
 
 static const struct rs6000_builtin_info_type rs6000_builtin_info[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 #undef RS6000_BUILTIN_0
@@ -1980,7 +1980,7 @@ struct rs6000_ptt
 static struct rs6000_ptt const processor_target_table[] =
 {
 #define RS6000_CPU(NAME, CPU, FLAGS) { NAME, CPU, FLAGS },
-#include "rs6000-cpus.def"
+#include "powerpcspe-cpus.def"
 #undef RS6000_CPU
 };
 
@@ -5163,7 +5163,7 @@ rs6000_option_override_internal (bool global_init_p)
 				 || rs6000_cpu == PROCESSOR_PPCE6500);
 
   /* Allow debug switches to override the above settings.  These are set to -1
-     in rs6000.opt to indicate the user hasn't directly set the switch.  */
+     in powerpcspe.opt to indicate the user hasn't directly set the switch.  */
   if (TARGET_ALWAYS_HINT >= 0)
     rs6000_always_hint = TARGET_ALWAYS_HINT;
 
@@ -14226,7 +14226,7 @@ def_builtin (const char *name, tree type, enum rs6000_builtins code)
 
 static const struct builtin_description bdesc_3arg[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* DST operations: void foo (void *, const int, const char).  */
@@ -14261,7 +14261,7 @@ static const struct builtin_description bdesc_3arg[] =
 
 static const struct builtin_description bdesc_dst[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* Simple binary operations: VECc = foo (VECa, VECb).  */
@@ -14296,7 +14296,7 @@ static const struct builtin_description bdesc_dst[] =
 
 static const struct builtin_description bdesc_2arg[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 #undef RS6000_BUILTIN_0
@@ -14331,7 +14331,7 @@ static const struct builtin_description bdesc_2arg[] =
 
 static const struct builtin_description bdesc_altivec_preds[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* SPE predicates.  */
@@ -14365,7 +14365,7 @@ static const struct builtin_description bdesc_altivec_preds[] =
 
 static const struct builtin_description bdesc_spe_predicates[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* SPE evsel predicates.  */
@@ -14399,7 +14399,7 @@ static const struct builtin_description bdesc_spe_predicates[] =
 
 static const struct builtin_description bdesc_spe_evsel[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* PAIRED predicates.  */
@@ -14433,7 +14433,7 @@ static const struct builtin_description bdesc_spe_evsel[] =
 
 static const struct builtin_description bdesc_paired_preds[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* ABS* operations.  */
@@ -14468,7 +14468,7 @@ static const struct builtin_description bdesc_paired_preds[] =
 
 static const struct builtin_description bdesc_abs[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* Simple unary operations: VECb = foo (unsigned literal) or VECb =
@@ -14504,7 +14504,7 @@ static const struct builtin_description bdesc_abs[] =
 
 static const struct builtin_description bdesc_1arg[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* Simple no-argument operations: result = __builtin_darn_32 () */
@@ -14539,7 +14539,7 @@ static const struct builtin_description bdesc_1arg[] =
 
 static const struct builtin_description bdesc_0arg[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 /* HTM builtins.  */
@@ -14573,7 +14573,7 @@ static const struct builtin_description bdesc_0arg[] =
 
 static const struct builtin_description bdesc_htm[] =
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 };
 
 #undef RS6000_BUILTIN_0
@@ -43399,4 +43399,4 @@ rs6000_optab_supported_p (int op, machine_mode mode1, machine_mode,
 \f
 struct gcc_target targetm = TARGET_INITIALIZER;
 
-#include "gt-rs6000.h"
+#include "gt-powerpcspe.h"
diff --git a/gcc/config/powerpcspe/powerpcspe.h b/gcc/config/powerpcspe/powerpcspe.h
index 3780a49..cd40c3e 100644
--- a/gcc/config/powerpcspe/powerpcspe.h
+++ b/gcc/config/powerpcspe/powerpcspe.h
@@ -27,7 +27,7 @@
    many of the definitions.  */
 
 #ifndef RS6000_OPTS_H
-#include "config/rs6000/rs6000-opts.h"
+#include "config/powerpcspe/powerpcspe-opts.h"
 #endif
 
 /* Definitions for the object file format.  These are set at
@@ -108,7 +108,7 @@
 #endif
 
 /* Common ASM definitions used by ASM_SPEC among the various targets for
-   handling -mcpu=xxx switches.  There is a parallel list in driver-rs6000.c to
+   handling -mcpu=xxx switches.  There is a parallel list in driver-powerpcspe.c to
    provide the default assembler options if the user uses -mcpu=native, so if
    you make changes here, make them also there.  */
 #define ASM_CPU_SPEC \
@@ -207,9 +207,9 @@
 
 /* -mcpu=native handling only makes sense with compiler running on
    an PowerPC chip.  If changing this condition, also change
-   the condition in driver-rs6000.c.  */
+   the condition in driver-powerpcspe.c.  */
 #if defined(__powerpc__) || defined(__POWERPC__) || defined(_AIX)
-/* In driver-rs6000.c.  */
+/* In driver-powerpcspe.c.  */
 extern const char *host_detect_local_cpu (int argc, const char **argv);
 #define EXTRA_SPEC_FUNCTIONS \
   { "local_cpu_detect", host_detect_local_cpu },
@@ -2000,7 +2000,7 @@ typedef struct rs6000_args
 /* #define RETURN_ADDR_IN_PREVIOUS_FRAME */
 
 /* Number of bytes into the frame return addresses can be found.  See
-   rs6000_stack_info in rs6000.c for more information on how the different
+   rs6000_stack_info in powerpcspe.c for more information on how the different
    abi's store the return address.  */
 #define RETURN_ADDRESS_OFFSET \
   ((DEFAULT_ABI == ABI_V4 ? 4 : 8) << (TARGET_64BIT ? 1 : 0))
@@ -2786,7 +2786,7 @@ extern int frame_pointer_needed;
 
 enum rs6000_builtins
 {
-#include "rs6000-builtin.def"
+#include "powerpcspe-builtin.def"
 
   RS6000_BUILTIN_COUNT
 };
diff --git a/gcc/config/powerpcspe/powerpcspe.opt b/gcc/config/powerpcspe/powerpcspe.opt
index a232d57..dc2fb11 100644
--- a/gcc/config/powerpcspe/powerpcspe.opt
+++ b/gcc/config/powerpcspe/powerpcspe.opt
@@ -20,7 +20,7 @@
 ; <http://www.gnu.org/licenses/>.
 
 HeaderInclude
-config/rs6000/rs6000-opts.h
+config/powerpcspe/powerpcspe-opts.h
 
 ;; ISA flag bits (on/off)
 Variable
diff --git a/gcc/config/powerpcspe/t-linux b/gcc/config/powerpcspe/t-linux
index 4cb63bd..1906338 100644
--- a/gcc/config/powerpcspe/t-linux
+++ b/gcc/config/powerpcspe/t-linux
@@ -18,6 +18,6 @@ MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
 endif
 endif
 
-rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+powerpcspe-linux.o: $(srcdir)/config/powerpcspe/powerpcspe-linux.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gcc/config/powerpcspe/t-linux64 b/gcc/config/powerpcspe/t-linux64
index 2830ed0..466e993 100644
--- a/gcc/config/powerpcspe/t-linux64
+++ b/gcc/config/powerpcspe/t-linux64
@@ -31,6 +31,6 @@ MULTILIB_EXTRA_OPTS :=
 MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
 MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
 
-rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+powerpcspe-linux.o: $(srcdir)/config/powerpcspe/powerpcspe-linux.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gcc/config/powerpcspe/t-powerpcspe b/gcc/config/powerpcspe/t-powerpcspe
index 7270723..fba9950 100644
--- a/gcc/config/powerpcspe/t-powerpcspe
+++ b/gcc/config/powerpcspe/t-powerpcspe
@@ -18,52 +18,52 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-TM_H += $(srcdir)/config/rs6000/rs6000-builtin.def
-TM_H += $(srcdir)/config/rs6000/rs6000-cpus.def
-PASSES_EXTRA += $(srcdir)/config/rs6000/rs6000-passes.def
+TM_H += $(srcdir)/config/powerpcspe/powerpcspe-builtin.def
+TM_H += $(srcdir)/config/powerpcspe/powerpcspe-cpus.def
+PASSES_EXTRA += $(srcdir)/config/powerpcspe/powerpcspe-passes.def
 
-rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c
+powerpcspe-c.o: $(srcdir)/config/powerpcspe/powerpcspe-c.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-$(srcdir)/config/rs6000/rs6000-tables.opt: $(srcdir)/config/rs6000/genopt.sh \
-  $(srcdir)/config/rs6000/rs6000-cpus.def
-	$(SHELL) $(srcdir)/config/rs6000/genopt.sh $(srcdir)/config/rs6000 > \
-		$(srcdir)/config/rs6000/rs6000-tables.opt
+$(srcdir)/config/powerpcspe/powerpcspe-tables.opt: $(srcdir)/config/powerpcspe/genopt.sh \
+  $(srcdir)/config/powerpcspe/powerpcspe-cpus.def
+	$(SHELL) $(srcdir)/config/powerpcspe/genopt.sh $(srcdir)/config/powerpcspe > \
+		$(srcdir)/config/powerpcspe/powerpcspe-tables.opt
 
 # The rs6000 backend doesn't cause warnings in these files.
 insn-conditions.o-warn =
 
-MD_INCLUDES = $(srcdir)/config/rs6000/rs64.md \
-	$(srcdir)/config/rs6000/mpc.md \
-	$(srcdir)/config/rs6000/40x.md \
-	$(srcdir)/config/rs6000/440.md \
-	$(srcdir)/config/rs6000/601.md \
-	$(srcdir)/config/rs6000/603.md \
-	$(srcdir)/config/rs6000/6xx.md \
-	$(srcdir)/config/rs6000/7xx.md \
-	$(srcdir)/config/rs6000/7450.md \
-	$(srcdir)/config/rs6000/8540.md \
-	$(srcdir)/config/rs6000/e300c2c3.md \
-	$(srcdir)/config/rs6000/e500mc.md \
-	$(srcdir)/config/rs6000/power4.md \
-	$(srcdir)/config/rs6000/power5.md \
-	$(srcdir)/config/rs6000/power6.md \
-	$(srcdir)/config/rs6000/power7.md \
-	$(srcdir)/config/rs6000/power8.md \
-	$(srcdir)/config/rs6000/power9.md \
-	$(srcdir)/config/rs6000/cell.md \
-	$(srcdir)/config/rs6000/xfpu.md \
-	$(srcdir)/config/rs6000/a2.md \
-	$(srcdir)/config/rs6000/predicates.md \
-	$(srcdir)/config/rs6000/constraints.md \
-	$(srcdir)/config/rs6000/darwin.md \
-	$(srcdir)/config/rs6000/sync.md \
-	$(srcdir)/config/rs6000/vector.md \
-	$(srcdir)/config/rs6000/vsx.md \
-	$(srcdir)/config/rs6000/altivec.md \
-	$(srcdir)/config/rs6000/crypto.md \
-	$(srcdir)/config/rs6000/htm.md \
-	$(srcdir)/config/rs6000/spe.md \
-	$(srcdir)/config/rs6000/dfp.md \
-	$(srcdir)/config/rs6000/paired.md
+MD_INCLUDES = $(srcdir)/config/powerpcspe/rs64.md \
+	$(srcdir)/config/powerpcspe/mpc.md \
+	$(srcdir)/config/powerpcspe/40x.md \
+	$(srcdir)/config/powerpcspe/440.md \
+	$(srcdir)/config/powerpcspe/601.md \
+	$(srcdir)/config/powerpcspe/603.md \
+	$(srcdir)/config/powerpcspe/6xx.md \
+	$(srcdir)/config/powerpcspe/7xx.md \
+	$(srcdir)/config/powerpcspe/7450.md \
+	$(srcdir)/config/powerpcspe/8540.md \
+	$(srcdir)/config/powerpcspe/e300c2c3.md \
+	$(srcdir)/config/powerpcspe/e500mc.md \
+	$(srcdir)/config/powerpcspe/power4.md \
+	$(srcdir)/config/powerpcspe/power5.md \
+	$(srcdir)/config/powerpcspe/power6.md \
+	$(srcdir)/config/powerpcspe/power7.md \
+	$(srcdir)/config/powerpcspe/power8.md \
+	$(srcdir)/config/powerpcspe/power9.md \
+	$(srcdir)/config/powerpcspe/cell.md \
+	$(srcdir)/config/powerpcspe/xfpu.md \
+	$(srcdir)/config/powerpcspe/a2.md \
+	$(srcdir)/config/powerpcspe/predicates.md \
+	$(srcdir)/config/powerpcspe/constraints.md \
+	$(srcdir)/config/powerpcspe/darwin.md \
+	$(srcdir)/config/powerpcspe/sync.md \
+	$(srcdir)/config/powerpcspe/vector.md \
+	$(srcdir)/config/powerpcspe/vsx.md \
+	$(srcdir)/config/powerpcspe/altivec.md \
+	$(srcdir)/config/powerpcspe/crypto.md \
+	$(srcdir)/config/powerpcspe/htm.md \
+	$(srcdir)/config/powerpcspe/spe.md \
+	$(srcdir)/config/powerpcspe/dfp.md \
+	$(srcdir)/config/powerpcspe/paired.md
diff --git a/gcc/config/powerpcspe/x-darwin b/gcc/config/powerpcspe/x-darwin
index 9d92ef5..984fc5f 100644
--- a/gcc/config/powerpcspe/x-darwin
+++ b/gcc/config/powerpcspe/x-darwin
@@ -1,3 +1,3 @@
-host-ppc-darwin.o : $(srcdir)/config/rs6000/host-darwin.c
+host-ppc-darwin.o : $(srcdir)/config/powerpcspe/host-darwin.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gcc/config/powerpcspe/x-darwin64 b/gcc/config/powerpcspe/x-darwin64
index 0932771..8a912316 100644
--- a/gcc/config/powerpcspe/x-darwin64
+++ b/gcc/config/powerpcspe/x-darwin64
@@ -1,3 +1,3 @@
-host-ppc64-darwin.o : $(srcdir)/config/rs6000/host-ppc64-darwin.c
+host-ppc64-darwin.o : $(srcdir)/config/powerpcspe/host-ppc64-darwin.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gcc/config/powerpcspe/x-powerpcspe b/gcc/config/powerpcspe/x-powerpcspe
index 9e31f24..57d5f70 100644
--- a/gcc/config/powerpcspe/x-powerpcspe
+++ b/gcc/config/powerpcspe/x-powerpcspe
@@ -1,3 +1,3 @@
-driver-rs6000.o : $(srcdir)/config/rs6000/driver-rs6000.c \
+driver-powerpcspe.o : $(srcdir)/config/powerpcspe/driver-powerpcspe.c \
   $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
-- 
1.9.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] Split off powerpcspe from rs6000 port
  2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
                   ` (2 preceding siblings ...)
  2017-05-15 20:54 ` [PATCH 3/3] Actual adjustments to make powerpcspe work Segher Boessenkool
@ 2017-05-17  5:53 ` Sebastian Huber
  2017-05-18 16:30   ` Segher Boessenkool
  2017-05-18 16:48 ` Segher Boessenkool
  4 siblings, 1 reply; 8+ messages in thread
From: Sebastian Huber @ 2017-05-17  5:53 UTC (permalink / raw)
  To: GCC; +Cc: Segher Boessenkool, Joel Sherrill

On 15/05/17 22:51, Segher Boessenkool wrote:
> -- This uses powerpc-*-rtems*spe*; do we want powerpcspe-*-rtems*
>     instead?  Or both?

I guess it will be powerpcspe-*-rtems*, but we have to fix our build 
system in this case. Don't worry about RTEMS.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] Split off powerpcspe from rs6000 port
  2017-05-17  5:53 ` [PATCH 0/3] Split off powerpcspe from rs6000 port Sebastian Huber
@ 2017-05-18 16:30   ` Segher Boessenkool
  0 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-18 16:30 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC, Joel Sherrill

On Wed, May 17, 2017 at 07:35:15AM +0200, Sebastian Huber wrote:
> On 15/05/17 22:51, Segher Boessenkool wrote:
> >-- This uses powerpc-*-rtems*spe*; do we want powerpcspe-*-rtems*
> >    instead?  Or both?
> 
> I guess it will be powerpcspe-*-rtems*, but we have to fix our build 
> system in this case. Don't worry about RTEMS.

Okay, thanks!

Fixes for rtems should be easy, if it works for any other powerpcspe port.


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] Split off powerpcspe from rs6000 port
  2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
                   ` (3 preceding siblings ...)
  2017-05-17  5:53 ` [PATCH 0/3] Split off powerpcspe from rs6000 port Sebastian Huber
@ 2017-05-18 16:48 ` Segher Boessenkool
  2017-05-24 19:43   ` Segher Boessenkool
  4 siblings, 1 reply; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-18 16:48 UTC (permalink / raw)
  To: gcc-patches
  Cc: David Edelsohn, Andrew Jenner, Arnaud Charlet, Joel Brobecker,
	Joel Sherrill, Joseph Myers, Olivier Hainque, Sandra Loosemore

On Mon, May 15, 2017 at 08:51:49PM +0000, Segher Boessenkool wrote:
> As discussed before, here is a series to split powerpcspe from the
> rs6000 port.  This series does not yet make any real changes to either
> port: it is a copy of rs6000/ to powerpcspe/, with some renames and
> some necessary changes to the port file, and slightly more involved
> changes to config.gcc .
> 
> This was tested on powerpc64-linux {-m32,-m64}, and it was build-tested
> on powerpc-linux-gnuspe (and the resulting compiler was tested to be
> functional: it can build various Linux defconfigs for SPE systems).

I am planning to commit this on monday, if I don't hear anything.


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] Split off powerpcspe from rs6000 port
  2017-05-18 16:48 ` Segher Boessenkool
@ 2017-05-24 19:43   ` Segher Boessenkool
  0 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2017-05-24 19:43 UTC (permalink / raw)
  To: gcc-patches
  Cc: David Edelsohn, Andrew Jenner, Arnaud Charlet, Joel Brobecker,
	Joel Sherrill, Joseph Myers, Olivier Hainque, Sandra Loosemore

On Thu, May 18, 2017 at 11:30:11AM -0500, Segher Boessenkool wrote:
> On Mon, May 15, 2017 at 08:51:49PM +0000, Segher Boessenkool wrote:
> > As discussed before, here is a series to split powerpcspe from the
> > rs6000 port.  This series does not yet make any real changes to either
> > port: it is a copy of rs6000/ to powerpcspe/, with some renames and
> > some necessary changes to the port file, and slightly more involved
> > changes to config.gcc .
> > 
> > This was tested on powerpc64-linux {-m32,-m64}, and it was build-tested
> > on powerpc-linux-gnuspe (and the resulting compiler was tested to be
> > functional: it can build various Linux defconfigs for SPE systems).
> 
> I am planning to commit this on monday, if I don't hear anything.

Done now, with the following changelog:


2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/powerpcspe: New port.  Files are copied from the rs6000
	port, with "rs6000" in filenames replaced by "powerpcspe".

	* config.gcc (powerpc*-*-*spe*): New.
	(powerpc-*-eabispe*): Use ${cpu_type} instead of hardcoded pathnames.
	(powerpc-*-rtems*spe*): New.
	(powerpc*-*-linux*spe*): New.
	(powerpc-wrs-vxworksspe): New.
	(powerpc*-*-*, rs6000-*-*): Use ${cpu_type}.
	(misc flags) [powerpc*-*-*, rs6000-*-*): Use ${cpu_type}.
	* config.host (powerpc*-*-*spe*): New.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-24 19:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 20:52 [PATCH 0/3] Split off powerpcspe from rs6000 port Segher Boessenkool
2017-05-15 20:52 ` [PATCH 1/3] Copy rs6000/ to powerpcspe/ Segher Boessenkool
2017-05-15 20:52 ` [PATCH 2/3] Rename various powerpcspe port files Segher Boessenkool
2017-05-15 20:54 ` [PATCH 3/3] Actual adjustments to make powerpcspe work Segher Boessenkool
2017-05-17  5:53 ` [PATCH 0/3] Split off powerpcspe from rs6000 port Sebastian Huber
2017-05-18 16:30   ` Segher Boessenkool
2017-05-18 16:48 ` Segher Boessenkool
2017-05-24 19:43   ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).