This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix ppc-vxworks not to clobber explicit options for E500
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Olivier Hainque <hainque at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Aug 2010 11:48:01 +0000 (UTC)
- Subject: Re: fix ppc-vxworks not to clobber explicit options for E500
- References: <20100820101957.GB12104@cardhu.act-europe.fr>
On Fri, 20 Aug 2010, Olivier Hainque wrote:
> It turns out that "-mfloat-gprs=double" is overriden by this piece in
> rs6000/vxworks.h:
>
> /* 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. */
> #undef SUBSUBTARGET_OVERRIDE_OPTIONS
> #define SUBSUBTARGET_OVERRIDE_OPTIONS \
> do { \
> if (TARGET_E500) \
> { \
> rs6000_spe = 1; \
> rs6000_spe_abi = 1; \
> rs6000_float_gprs = 1; \ <===
> } \
>
> This patch is a suggestion to protect this default and the others by a
> check on the corresponding rs6000_explicit_options.
Although such a check on rs6000_explicit_options seems correct, it would
also seem in line with the intention of this code in vxworks.h for the
default to be 1 for -mcpu=8540 and 2 for -mcpu=8548 - which would however
require proper separate CPU entries for 8540 and 8548 (including making
the scheduler in 8540.md apply for both CPUs where it presently checks for
"ppc8540").
--
Joseph S. Myers
joseph@codesourcery.com