This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix ppc-vxworks not to clobber explicit options for E500


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]