config.gcc (powerpc-*-eabispe*, [...]): Add rs6000/e500.h to tm_file.

* config.gcc (powerpc-*-eabispe*, powerpc-*-eabisimaltivec*,
	powerpc-*-eabisim*, powerpc-*-eabialtivec*, powerpc-*-eabi*,
	powerpc-*-rtems*, powerpc-wrs-vxworks, powerpc-wrs-vxworksae,
	powerpcle-*-eabisim*, powerpcle-*-eabi*): Add rs6000/e500.h to
	tm_file.
	* config/rs6000/e500.h: New.
	* config/rs6000/eabi.h (TARGET_SPE_ABI, TARGET_SPE, TARGET_E500,
	TARGET_ISEL, TARGET_FPRS, TARGET_E500_SINGLE, TARGET_E500_DOUBLE):
	Remove.
	* config/rs6000/linuxspe.h (TARGET_SPE_ABI, TARGET_SPE,
	TARGET_E500, TARGET_ISEL, TARGET_FPRS, TARGET_E500_SINGLE,
	TARGET_E500_DOUBLE): Remove.
	* config/rs6000/vxworks.h (TARGET_SPE_ABI, TARGET_SPE,
	TARGET_E500, TARGET_ISEL, TARGET_FPRS): Remove.
	* config/rs6000/rs6000.h (CHECK_E500_OPTIONS): Define.
	* config/rs6000/rs6000.c (rs6000_override_options): Use
	CHECK_E500_OPTIONS.

From-SVN: r120340
This commit is contained in:
Joseph Myers 2007-01-02 13:08:01 +00:00 committed by Joseph Myers
parent 8ef65e3da8
commit eca0d5e8ce
8 changed files with 88 additions and 64 deletions

View File

@ -1,3 +1,23 @@
2007-01-02 Joseph Myers <joseph@codesourcery.com>
* config.gcc (powerpc-*-eabispe*, powerpc-*-eabisimaltivec*,
powerpc-*-eabisim*, powerpc-*-eabialtivec*, powerpc-*-eabi*,
powerpc-*-rtems*, powerpc-wrs-vxworks, powerpc-wrs-vxworksae,
powerpcle-*-eabisim*, powerpcle-*-eabi*): Add rs6000/e500.h to
tm_file.
* config/rs6000/e500.h: New.
* config/rs6000/eabi.h (TARGET_SPE_ABI, TARGET_SPE, TARGET_E500,
TARGET_ISEL, TARGET_FPRS, TARGET_E500_SINGLE, TARGET_E500_DOUBLE):
Remove.
* config/rs6000/linuxspe.h (TARGET_SPE_ABI, TARGET_SPE,
TARGET_E500, TARGET_ISEL, TARGET_FPRS, TARGET_E500_SINGLE,
TARGET_E500_DOUBLE): Remove.
* config/rs6000/vxworks.h (TARGET_SPE_ABI, TARGET_SPE,
TARGET_E500, TARGET_ISEL, TARGET_FPRS): Remove.
* config/rs6000/rs6000.h (CHECK_E500_OPTIONS): Define.
* config/rs6000/rs6000.c (rs6000_override_options): Use
CHECK_E500_OPTIONS.
2007-01-02 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/rs6000.c (print_operand): Check (TARGET_SPE ||

View File

@ -1,5 +1,5 @@
# GCC target-specific configuration file.
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#This file is part of GCC.
@ -1780,17 +1780,17 @@ powerpc-*-chorusos*)
use_fixproto=yes
;;
powerpc-*-eabispe*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabispe.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.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"
;;
powerpc-*-eabisimaltivec*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
;;
powerpc-*-eabisim*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
;;
@ -1801,17 +1801,17 @@ powerpc-*-elf*)
use_fixproto=yes
;;
powerpc-*-eabialtivec*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
;;
powerpc-*-eabi*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
;;
powerpc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
;;
@ -1821,7 +1821,7 @@ powerpc-*-linux*altivec*)
tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
;;
powerpc-*-linux*spe*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h rs6000/e500.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
;;
@ -1871,11 +1871,11 @@ powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
extra_headers=ppc-asm.h
case ${target} in
*-vxworksae*)
tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h rs6000/vxworksae.h"
tmake_file="${tmake_file} rs6000/t-vxworksae"
;;
*-vxworks*)
tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
;;
esac
;;
@ -1910,12 +1910,12 @@ powerpcle-*-elf*)
use_fixproto=yes
;;
powerpcle-*-eabisim*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
;;
powerpcle-*-eabi*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
;;

48
gcc/config/rs6000/e500.h Normal file
View File

@ -0,0 +1,48 @@
/* Enable E500 support.
Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your
option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#undef TARGET_SPE_ABI
#undef TARGET_SPE
#undef TARGET_E500
#undef TARGET_ISEL
#undef TARGET_FPRS
#undef TARGET_E500_SINGLE
#undef TARGET_E500_DOUBLE
#undef CHECK_E500_OPTIONS
#define TARGET_SPE_ABI rs6000_spe_abi
#define TARGET_SPE rs6000_spe
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_ISEL rs6000_isel
#define TARGET_FPRS (rs6000_float_gprs == 0)
#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
#define CHECK_E500_OPTIONS \
do { \
if (TARGET_E500 || TARGET_SPE || TARGET_SPE_ABI || TARGET_ISEL \
|| TARGET_E500_SINGLE || TARGET_E500_DOUBLE) \
{ \
if (TARGET_ALTIVEC) \
error ("AltiVec and E500 instructions cannot coexist"); \
if (TARGET_64BIT) \
error ("64-bit E500 not supported"); \
if (TARGET_HARD_FLOAT && TARGET_FPRS) \
error ("E500 and FPRs not supported"); \
} \
} while (0)

View File

@ -1,6 +1,6 @@
/* Core target definitions for GNU compiler
for IBM RS/6000 PowerPC targeted to embedded ELF systems.
Copyright (C) 1995, 1996, 2000, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2000, 2003, 2004, 2007 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GCC.
@ -43,19 +43,3 @@
TARGET_OS_SYSV_CPP_BUILTINS (); \
} \
while (0)
#undef TARGET_SPE_ABI
#undef TARGET_SPE
#undef TARGET_E500
#undef TARGET_ISEL
#undef TARGET_FPRS
#undef TARGET_E500_SINGLE
#undef TARGET_E500_DOUBLE
#define TARGET_SPE_ABI rs6000_spe_abi
#define TARGET_SPE rs6000_spe
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_ISEL rs6000_isel
#define TARGET_FPRS (rs6000_float_gprs == 0)
#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)

View File

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for PowerPC e500 machines running GNU/Linux.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Aldy Hernandez (aldy@quesejoda.com).
This file is part of GCC.
@ -27,22 +27,6 @@
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN)
#undef TARGET_SPE_ABI
#undef TARGET_SPE
#undef TARGET_E500
#undef TARGET_ISEL
#undef TARGET_FPRS
#undef TARGET_E500_SINGLE
#undef TARGET_E500_DOUBLE
#define TARGET_SPE_ABI rs6000_spe_abi
#define TARGET_SPE rs6000_spe
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_ISEL rs6000_isel
#define TARGET_FPRS (rs6000_float_gprs == 0)
#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
#undef SUBSUBTARGET_OVERRIDE_OPTIONS
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
if (rs6000_select[1].string == NULL) \

View File

@ -1446,9 +1446,6 @@ rs6000_override_options (const char *default_cpu)
if (TARGET_E500)
{
if (TARGET_ALTIVEC)
error ("AltiVec and E500 instructions cannot coexist");
/* The e500 does not have string instructions, and we set
MASK_STRING above when optimizing for size. */
if ((target_flags & MASK_STRING) != 0)
@ -1471,6 +1468,9 @@ rs6000_override_options (const char *default_cpu)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
}
/* Detect invalid option combinations with E500. */
CHECK_E500_OPTIONS;
rs6000_always_hint = (rs6000_cpu != PROCESSOR_POWER4
&& rs6000_cpu != PROCESSOR_POWER5
&& rs6000_cpu != PROCESSOR_POWER6

View File

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
@ -341,6 +341,7 @@ extern enum rs6000_nop_insertion rs6000_sched_insert_nops;
#define TARGET_FPRS 1
#define TARGET_E500_SINGLE 0
#define TARGET_E500_DOUBLE 0
#define CHECK_E500_OPTIONS do { } while (0)
/* E500 processors only support plain "sync", not lwsync. */
#define TARGET_NO_LWSYNC TARGET_E500

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Vxworks PowerPC version.
Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005
Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
@ -117,19 +117,6 @@ VXWORKS_ADDITIONAL_CPP_SPEC
/* Override sysv4.h, reset to the default. */
#undef PREFERRED_STACK_BOUNDARY
/* Enable SPE */
#undef TARGET_SPE_ABI
#undef TARGET_SPE
#undef TARGET_E500
#undef TARGET_ISEL
#undef TARGET_FPRS
#define TARGET_SPE_ABI rs6000_spe_abi
#define TARGET_SPE rs6000_spe
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_ISEL rs6000_isel
#define TARGET_FPRS (!rs6000_float_gprs)
/* Make -mcpu=8540 imply SPE. ISEL is automatically enabled, the
others must be done by hand. Handle -mrtp. Disable -fPIC
for -mrtp - the VxWorks PIC model is not compatible with it. */