@@ -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-*-*)
@@ -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"
@@ -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
@@ -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.
;
@@ -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,
struct gcc_target targetm = TARGET_INITIALIZER;
-#include "gt-rs6000.h"
+#include "gt-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
};
@@ -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
@@ -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)
@@ -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)
@@ -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
@@ -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)
@@ -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)
@@ -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) $<