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: David Edelsohn <dje dot gcc at gmail dot com>
- To: Olivier Hainque <hainque at adacore dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 21 Aug 2010 11:53:19 -0400
- Subject: Re: fix ppc-vxworks not to clobber explicit options for E500
Joseph S. Myers wrote:
> > #define SUBSUBTARGET_OVERRIDE_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").
> Hmm, I agree that having proper handling of the 8548 would be a nice
> improvement. However, it seems to me that the check not to override explicit
> requests is useful either way, so the two look pretty orthogonal IMO.
I think Joseph is suggesting that checking for rs6000_explicit_options
fixes the symptom, but not the problem. ppc8548 supports double gprs
and ppc8540 supports float gprs. One should distinguish ppc8548 for
double gprs.
More fundamentally,
e500.h:#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
is wrong. TARGET_E500 should not be checking for a specific CPU.
This broken logic was introduced when E500 support initially was
added.
I don't mind checking for rs6000_explicit_options, but adding that
simply to allow
-mfloat-gprs=double
on the command line for ppc8548 is solving the symptom and not the problem.
- David