From 49664873f8397f8ebd0aa14b57497974e703651a Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Wed, 28 May 2014 09:51:07 +0000 Subject: [PATCH] vxworks.h (VXCPU_FOR_8548): New. 2014-05-28 Olivier Hainque * config/rs6000/vxworks.h (VXCPU_FOR_8548): New. Default to PPC85XX. (CPP_SPEC): Add entry for -mcpu=8548. * config/rs6000/vxworksae.h: Reinstate. Override VXCPU_FOR_8548. * config.gcc (powerpc-wrs-vxworksae, tm_file): Add back vxworksae.h. From-SVN: r211011 --- ChangeLog | 7 +++++++ gcc/config.gcc | 2 +- gcc/config/rs6000/vxworks.h | 7 +++++++ gcc/config/rs6000/vxworksae.h | 23 +++++++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gcc/config/rs6000/vxworksae.h diff --git a/ChangeLog b/ChangeLog index ba82dd58b84..f2534a86cfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-05-28 Olivier Hainque + + * config/rs6000/vxworks.h (VXCPU_FOR_8548): New. Default to PPC85XX. + (CPP_SPEC): Add entry for -mcpu=8548. + * config/rs6000/vxworksae.h: Reinstate. Override VXCPU_FOR_8548. + * config.gcc (powerpc-wrs-vxworksae, tm_file): Add back vxworksae.h. + 2014-05-26 Richard Sandiford Olivier Hainque diff --git a/gcc/config.gcc b/gcc/config.gcc index bf053851d9f..c3f3ea6646c 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2313,7 +2313,7 @@ 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/e500.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*) diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h index 7b4e9b9eba6..a9ddea22dba 100644 --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -60,6 +60,12 @@ along with GCC; see the file COPYING3. If not see #define SUBTARGET_EXTRA_SPECS /* none needed */ +/* VxWorks and VxWorksAE (aka 653) expect different CPU values to designate + SPE on 8548. We define a dedicated macro for the base VxWorks here, which + the AE configuration will override. */ + +#define VXCPU_FOR_8548 "PPC85XX" + /* FIXME: The only reason we allow no -mcpu switch at all is because config-ml.in insists on a "." multilib. */ #define CPP_SPEC \ @@ -73,6 +79,7 @@ along with GCC; see the file COPYING3. If not see mcpu=604 : -DCPU=PPC604 ; \ mcpu=860 : -DCPU=PPC860 ; \ mcpu=8540: -DCPU=PPC85XX ; \ + mcpu=8548: -DCPU=" VXCPU_FOR_8548 "; \ : -DCPU=PPC604 }}" \ VXWORKS_ADDITIONAL_CPP_SPEC diff --git a/gcc/config/rs6000/vxworksae.h b/gcc/config/rs6000/vxworksae.h new file mode 100644 index 00000000000..95a2a7c4632 --- /dev/null +++ b/gcc/config/rs6000/vxworksae.h @@ -0,0 +1,23 @@ +/* Definitions of target machine for GNU compiler. PowerPC VxworksAE version. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Contributed by CodeSourcery, LLC. + +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 3, 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 COPYING3. If not see +. */ + +/* VxWorksAE for E500V2 expects a specific CPU value to designate 8548. */ +#undef VXCPU_FOR_8548 +#define VXCPU_FOR_8548 "PPCE500V2"