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]

[patch] ppc SUBTARGET_OVERRIDE_OPTIONS


hi david.

i'd like to move *SUBTARGET_OVERRIDE_OPTIONS before we handle user
options such as -mdebug-, -mlong-double-, -mabi=, -mvrsave=, etc.

as it stands now, if a target sets say:

  #define SUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1

there is no way to unset it with -mabi=no-altivec, because 
*SUBTARGET_OVERRIDE_OPTIONS comes after.

same thing goes for vrsave, long-double, and -mdebug settings.  if
your target sets SUBTARGET_OVERRIDE_OPTIONS to twiddle the settings,
you can't undo the change with user options.

ok?

2002-06-27  Aldy Hernandez  <aldyh@redhat.com>

	* rs6000.c (rs6000_override_options): Move
	*SUBTARGET_OVERRIDE_OPTIONS before the -m options.


Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.332
diff -c -p -r1.332 rs6000.c
*** config/rs6000/rs6000.c	14 Jun 2002 14:44:33 -0000	1.332
--- config/rs6000/rs6000.c	28 Jun 2002 03:52:14 -0000
*************** rs6000_override_options (default_cpu)
*** 541,546 ****
--- 541,553 ----
      }
  #endif
  
+ #ifdef SUBTARGET_OVERRIDE_OPTIONS
+   SUBTARGET_OVERRIDE_OPTIONS;
+ #endif
+ #ifdef SUBSUBTARGET_OVERRIDE_OPTIONS
+   SUBSUBTARGET_OVERRIDE_OPTIONS;
+ #endif
+ 
    /* Set debug flags */
    if (rs6000_debug_name)
      {
*************** rs6000_override_options (default_cpu)
*** 594,606 ****
       alternate names now.  */
    if (TARGET_REGNAMES)
      memcpy (rs6000_reg_names, alt_reg_names, sizeof (rs6000_reg_names));
- #endif
- 
- #ifdef SUBTARGET_OVERRIDE_OPTIONS
-   SUBTARGET_OVERRIDE_OPTIONS;
- #endif
- #ifdef SUBSUBTARGET_OVERRIDE_OPTIONS
-   SUBSUBTARGET_OVERRIDE_OPTIONS;
  #endif
  
    /* Set TARGET_AIX_STRUCT_RET last, after the ABI is determined.
--- 601,606 ----


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