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]

RFA: Use Var() for string options


This patch extends the .opt Var() flag so that it can be used for
string options too.  At the moment, many backends have code like:

    const char *an_option_string;

    bool
    foo_handle_options (...)
    {
      ...
      case OPT_man_option_:
        an_option_string = arg;
        return true;
      ...
    }

The patch means that you can simply add "Var(an_option_string)"
to -man-option's .opt entry instead.

The patch also changes the backends to make use of this feature in
cases where the transformation was trivial.  The only port I didn't
change was rs6000, which is a bit more delicate than most.

Hopefully the patch can be justified purely as a clean-up.  However,
it's also part of a plan to support automatic PCH checking of options.
The idea is that every option that affects the validity of a PCH file
should have a state variable attached to it.  If the .opt file doesn't
specify one, the scripts will use a static variable instead.

The patch therefore helps in two ways: it brings in some of the
infrastructure needed for those static variables, and it attaches
Var()s to options that already have an obvious (non-static) state
variable.

One other slight change (and perhaps I should have done this
separately) is that options.h no longer quotes the option name
and help string above each "extern".  The justification is that:

  - The same information is still available in options.c.
  - Copying it options.h just leads to an unnecessary "remake world"
    if you change a help string.
  - The convention in hand-written files is to add documentation
    above the definition, not the declaration.  We might as well
    do the same thing in automatically-generated files too.

I tested the patch by building cc1 for:

    alpha-linux-gnu
    arc-elf
    arm-elf
    avr-elf
    bfin-elf
    c4x-elf
    cris-aout
    ia64-linux-gnu
    m32r-elf
    mips-elf
    powerpc-aix4.3
    s390-linux-gnu
    sparc-linux-gnu

Also bootstrapped & regression tested on i686-pc-linux-gnu.  OK to install?

Richard


	* opt-functions.awk (var_type): New function.
	(var_set): Use CLVC_STRING if var_type returns "const char *".
	* opth-gen.awk: Use var_type to find out the types of variables.
	Don't print comments above each "extern" definition.
	* optc-gen.awk: Use var_type in the same way.
	* opts.h (cl_var_cond): Rename to...
	(cl_var_type): ...this.  Add CLVC_STRING.
	(cl_option): Make "flag_var" a "void *" pointer.  Replace "var_cond"
	with "var_type".
	* opts.c (handle_option, option_enabled): Update after above name
	change.  Cast flag_var before using it.  Handle CLVC_STRING.
	
	* config/alpha/alpha.h (alpha_tls_size): Delete.
	* config/alpha/alpha.c (alpha_tls_size, alpha_cpu_string)
	(alpha_tune_string, alpha_tp_string, alpha_fprm_string)
	(alpha_fptm_string, alpha_mlat_string): Delete.
	(alpha_handle_option): Don't set the above variables here.  Use the
	integer argument to check the validity of -mtls-size=.
	* config/alpha/alpha.opt (mcpu=, mtune=, mfp-rounding-mode=)
	(mfp-trap-mode=, mtrap-precision=, mmemory-latency=): Add Var()s.
	(mtls-size=): Likewise.  Convert to a UInteger and initialize the
	variable to 32.

	* config/arc/arc.c (arc_cpu_string, arc_text_string)
	(arc_data_string, arc_rodata_string): Delete.
	(arc_handle_option): Don't set the above variables here.
	* config/arc/arc.opt (mcpu=, mtext=, mdata=, mrodata=): Add Var()s
	and initialize them.

	* config/arm/arm.c (target_fpu_name, target_fpe_name)
	(target_float_abi_name, target_abi_name, structure_size_string)
	(arm_pic_register_string): Delete.
	(arm_handle_option): Don't set the above variables here, except
	in the handling of -mhard-float and -msoft-float.
	* config/arm/arm.opt (mabi=, mfloat-abi=, mfp=, mfpe=, mfpu=)
	(mpic-register=, mstructure-size-boundary=): Add Var()s.

	* config/avr/avr.c (avr_init_stack, avr_mcu_name, TARGET_HANDLE_OPTION)
	(avr_handle_option): Delete.
	* config/avr/avr.opt (mmcu=, minit-stack=): Add Var()s and initialize
	them.

	* config/bfin/bfin.c (bfin_library_id): Delete.
	(bfin_handle_option): Don't set it.
	* config/bfin/bfin.opt (mshared-library-id=): Add Var().

	* config/c4x/c4x.h (c4x_rpts_cycles): Delete.
	* config/c4x/c4x.c (c4x_rpts_cycles): Delete.
	(c4x_handle_option): Don't set c4x_rpts_cycles here.
	* config/c4x/c4x.opt (mrpts=): Add Var().

	* config/cris/aout.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't set
	cris_elinux_stacksize_str here.
	* config/cris/aout.opt (melinux-stacksize=): Add Var().
	* config/cris/cris.h (cris_max_stackframe_str, cris_cpu_str)
	(cris_tune_str, cris_elinux_stacksize_str): Delete.
	* config/cris/cris.c (cris_max_stackframe_str, cris_cpu_str)
	(cris_tune_str, cris_elinux_stacksize_str): Delete.
	(cris_handle_option): Don't set the above variables here.

	* config/i386/i386.h (ix86_tune_string, ix86_arch_string): Delete.
	* config/i386/i386.c (ix86_cmodel_string, ix86_asm_string)
	(ix86_tls_dialect_string, ix86_tune_string, ix86_arch_string)
	(ix86_fpmath_string, ix86_regparm_string, ix86_align_loops_string)
	(ix86_align_jumps_string, ix86_preferred_stack_boundary_string)
	(ix86_branch_cost_string, ix86_align_funcs_string): Delete.
	(ix86_handle_option): Don't set the above variables here.
	* config/i386/i386.opt (malign-functions=, malign-jumps=)
	(malign-loops=, march=, masm=, mbranch-cost=, mcmodel=, mfpmath=)
	(mpreferred-stack-boundary=, mregparm=, mtls-dialect=, mtune=): Add
	Var()s.

	* config/ia64/ia64.h (ia64_tls_size): Delete.
	* config/ia64/ia64.c (ia64_tls_size): Delete.
	(ia64_handle_option): Treat -mtls-size= as a UInteger option,
	reading the integer argument from the "value" parameter.  Don't
	set ia64_tls_size here.
	* config/ia64/ia64.opt (mtls-size=): Turn into a UInteger option.
	Add Var() and Init().

	* config/m32r/m32r.h (m32r_cache_flush_func): Delete.
	(m32r_cache_flush_trap): Delete.
	* config/m32r/m32r.c (m32r_cache_flush_func): Delete.
	(m32r_cache_flush_trap): Delete.
	(m32r_handle_option): Don't set the above variables when handling
	-mflush-func= and -mflush-trap=.
	* config/m32r/m32r.opt (-mflush-func=, -mflush-trap=): Add Var()s
	and Init()s.

	* config/mips/mips.h (mips_cache_flush_func): Delete.
	* config/mips/mips.c (mips_arch_string, mips_tune_string)
	(mips_cache_flush_func): Delete.
	(mips_handle_option): Don't set the above variables when handling
	-march=, -mtune= and -mflush-func=.
	* config/mips/mips.opt (march=, mflush-func=, mtune=): Add Var()s.

	* config/s390/s390.c (s390_arch_string): Delete.
	(s390_handle_option): Don't set it here.
	* config/s390/s390.opt (march=): Add Var().

	* config/sparc/sparc.h (sparc_cmodel_string): Delete.
	* config/sparc/sparc.c (sparc_cmodel_string): Delete.
	(sparc_handle_option): Don't set it here.
	* config/sparc/sparc.opt (mcmodel=): Add Var().

Index: opt-functions.awk
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opt-functions.awk,v
retrieving revision 2.5
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r2.5 opt-functions.awk
--- opt-functions.awk	7 May 2005 19:03:22 -0000	2.5
+++ opt-functions.awk	25 May 2005 17:49:18 -0000
@@ -89,6 +89,17 @@ function var_name(flags)
 	return nth_arg(0, opt_args("Var", flags))
 }
 
+# Return the type of variable that should be associated with the given flags.
+function var_type(flags)
+{
+	if (!flag_set_p("Joined.*", flags))
+		return "int "
+	else if (flag_set_p("UInteger", flags))
+		return "int "
+	else
+		return "const char *"
+}
+
 # Given that an option has flags FLAGS, return an initializer for the
 # "var_cond" and "var_value" fields of its cl_options[] entry.
 function var_set(flags)
@@ -109,9 +120,11 @@ function var_set(flags)
 		vn = var_name(flags);
 		if (vn)
 			return "CLVC_BIT_CLEAR, OPTION_MASK_" s
-			  else
+		else
 			return "CLVC_BIT_CLEAR, MASK_" s
 	}
+	if (var_type(flags) == "const char *")
+		return "CLVC_STRING, 0"
 	return "CLVC_BOOLEAN, 0"
 }
 
Index: opth-gen.awk
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opth-gen.awk,v
retrieving revision 2.7
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r2.7 opth-gen.awk
--- opth-gen.awk	15 May 2005 08:16:01 -0000	2.7
+++ opth-gen.awk	25 May 2005 17:49:18 -0000
@@ -68,12 +68,9 @@ for (i = 0; i < n_opts; i++) {
 	if (name == "")
 		continue;
 
-	print "/* Set by -" opts[i] "."
-	print "   " help[i] "  */"
-	print "extern int " name ";"
-	print ""
-
-    }
+	print "extern " var_type(flags[i]) name ";"
+}
+print ""
 
 for (i = 0; i < n_opts; i++) {
 	name = opt_args("Mask", flags[i])
Index: optc-gen.awk
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optc-gen.awk,v
retrieving revision 2.8
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r2.8 optc-gen.awk
--- optc-gen.awk	16 May 2005 18:14:03 -0000	2.8
+++ optc-gen.awk	25 May 2005 17:49:18 -0000
@@ -77,8 +77,10 @@ for (i = 0; i < n_opts; i++) {
 	else if (name in var_seen)
 		continue;
 
-	printf ("/* Set by -%s.\n   %s  */\nint %s%s;\n\n",
-	    opts[i], help[i], name,init)
+	print "/* Set by -" opts[i] "."
+	print "   " help[i] "  */"
+	print var_type(flags[i]) name init ";"
+	print ""
 
 	var_seen[name] = 1;
 }
Index: opts.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.h,v
retrieving revision 1.22
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.22 opts.h
--- opts.h	16 May 2005 12:30:04 -0000	1.22
+++ opts.h	25 May 2005 17:49:18 -0000
@@ -22,7 +22,7 @@ 02111-1307, USA.  */
 #define GCC_OPTS_H
 
 /* Specifies how a switch's VAR_VALUE relates to its FLAG_VAR.  */
-enum cl_var_cond {
+enum cl_var_type {
   /* The switch is enabled when FLAG_VAR is nonzero.  */
   CLVC_BOOLEAN,
 
@@ -33,7 +33,11 @@ enum cl_var_cond {
   CLVC_BIT_CLEAR,
 
   /* The switch is enabled when VAR_VALUE is set in FLAG_VAR.  */
-  CLVC_BIT_SET
+  CLVC_BIT_SET,
+
+  /* The switch takes a string argument and FLAG_VAR points to that
+     argument.  */
+  CLVC_STRING
 };
 
 struct cl_option
@@ -43,8 +47,8 @@ struct cl_option
   unsigned short back_chain;
   unsigned char opt_len;
   unsigned int flags;
-  int *flag_var;
-  enum cl_var_cond var_cond;
+  void *flag_var;
+  enum cl_var_type var_type;
   int var_value;
 };
 
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.108
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.108 opts.c
--- opts.c	16 May 2005 12:30:04 -0000	1.108
+++ opts.c	25 May 2005 17:49:19 -0000
@@ -379,25 +379,31 @@ handle_option (const char **argv, unsign
     }
 
   if (option->flag_var)
-    switch (option->var_cond)
+    switch (option->var_type)
       {
       case CLVC_BOOLEAN:
-	*option->flag_var = value;
+	*(int *) option->flag_var = value;
 	break;
 
       case CLVC_EQUAL:
-	*option->flag_var = value ? option->var_value : !option->var_value;
+	*(int *) option->flag_var = (value
+				     ? option->var_value
+				     : !option->var_value);
 	break;
 
       case CLVC_BIT_CLEAR:
       case CLVC_BIT_SET:
-	if ((value != 0) == (option->var_cond == CLVC_BIT_SET))
-	  *option->flag_var |= option->var_value;
+	if ((value != 0) == (option->var_type == CLVC_BIT_SET))
+	  *(int *) option->flag_var |= option->var_value;
 	else
-	  *option->flag_var &= ~option->var_value;
+	  *(int *) option->flag_var &= ~option->var_value;
 	if (option->flag_var == &target_flags)
 	  target_flags_explicit |= option->var_value;
 	break;
+
+      case CLVC_STRING:
+	*(const char **) option->flag_var = arg;
+	break;
       }
   
   if (option->flags & lang_mask)
@@ -1416,19 +1422,22 @@ option_enabled (int opt_idx)
 {
   const struct cl_option *option = &(cl_options[opt_idx]);
   if (option->flag_var)
-    switch (option->var_cond)
+    switch (option->var_type)
       {
       case CLVC_BOOLEAN:
-	return *option->flag_var != 0;
+	return *(int *) option->flag_var != 0;
 
       case CLVC_EQUAL:
-	return *option->flag_var == option->var_value;
+	return *(int *) option->flag_var == option->var_value;
 
       case CLVC_BIT_CLEAR:
-	return (*option->flag_var & option->var_value) == 0;
+	return (*(int *) option->flag_var & option->var_value) == 0;
 
       case CLVC_BIT_SET:
-	return (*option->flag_var & option->var_value) != 0;
+	return (*(int *) option->flag_var & option->var_value) != 0;
+
+      case CLVC_STRING:
+	break;
       }
   return -1;
 }
Index: doc/options.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/options.texi,v
retrieving revision 1.6
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.6 options.texi
--- doc/options.texi	16 May 2005 12:30:06 -0000	1.6
+++ doc/options.texi	25 May 2005 17:49:19 -0000
@@ -121,12 +121,29 @@ will check and convert the argument befo
 option handler.
 
 @item Var(@var{var})
-The option controls an integer variable @var{var}.  If the option has
-the @code{UInteger} property, the option parser will set @var{var} to
-the value of the user-specified argument.  Otherwise the option is
-assumed to be an on/off switch that is active when @var{var} is nonzero.
-In this case, the option parser will set @var{var} to 1 when the positive
-form of the option is used and 0 when the ``no-'' form is used.
+The state of this option should be stored in variable @var{var}.
+The way that the state is stored depends on the type of option:
+
+@itemize @bullet
+@item
+If the option uses the @code{Mask} or @code{InverseMask} properties,
+@var{var} is the integer variable that contains the mask.
+
+@item
+If the option is a normal on/off switch, @var{var} is an integer
+variable that is nonzero when the option is enabled.  The options
+parser will set the variable to 1 when the positive form of the
+option is used and 0 when the ``no-'' form is used.
+
+@item
+If the option takes an argument and has the @code{UInteger} property,
+@var{var} is an integer variable that stores the value of the argument.
+
+@item
+Otherwise, if the option takes an argument, @var{var} is a pointer to
+the argument string.  The pointer will be null if the argument is optional
+and wasn't given.
+@end itemize
 
 The option-processing script will usually declare @var{var} in
 @file{options.c} and leave it to be zero-initialized at start-up time.
Index: config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.241
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.241 alpha.h
--- config/alpha/alpha.h	8 May 2005 09:48:20 -0000	1.241
+++ config/alpha/alpha.h	25 May 2005 17:54:55 -0000
@@ -152,7 +152,6 @@ extern int target_flags;
 extern enum alpha_trap_precision alpha_tp;
 extern enum alpha_fp_rounding_mode alpha_fprm;
 extern enum alpha_fp_trap_mode alpha_fptm;
-extern int alpha_tls_size;
 
 /* Invert the easy way to make options work.  */
 #define TARGET_FP	(!TARGET_SOFT_FP)
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.424
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.424 alpha.c
--- config/alpha/alpha.c	20 May 2005 02:38:55 -0000	1.424
+++ config/alpha/alpha.c	25 May 2005 17:54:57 -0000
@@ -79,19 +79,6 @@ enum alpha_fp_rounding_mode alpha_fprm;
 
 enum alpha_fp_trap_mode alpha_fptm;
 
-/* Specify bit size of immediate TLS offsets.  */
-
-int alpha_tls_size = 32;
-
-/* Strings decoded into the above options.  */
-
-static const char *alpha_cpu_string;	/* -mcpu= */
-static const char *alpha_tune_string;	/* -mtune= */
-static const char *alpha_tp_string;	/* -mtrap-precision=[p|s|i] */
-static const char *alpha_fprm_string;	/* -mfp-rounding-mode=[n|m|c|d] */
-static const char *alpha_fptm_string;	/* -mfp-trap-mode=[n|u|su|sui] */
-static const char *alpha_mlat_string;	/* -mmemory-latency= */
-
 /* Save information from a "cmpxx" operation until the branch or scc is
    emitted.  */
 
@@ -239,38 +226,8 @@ alpha_handle_option (size_t code, const 
       target_flags |= MASK_IEEE_CONFORMANT;
       break;
 
-    case OPT_mcpu_:
-      alpha_cpu_string = arg;
-      break;
-
-    case OPT_mtune_:
-      alpha_tune_string = arg;
-      break;
-
-    case OPT_mfp_rounding_mode_:
-      alpha_fprm_string = arg;
-      break;
-
-    case OPT_mfp_trap_mode_:
-      alpha_fptm_string = arg;
-      break;
-
-    case OPT_mtrap_precision_:
-      alpha_tp_string = arg;
-      break;
-
-    case OPT_mmemory_latency_:
-      alpha_mlat_string = arg;
-      break;
-
     case OPT_mtls_size_:
-      if (strcmp (arg, "16") == 0)
-	alpha_tls_size = 16;
-      else if (strcmp (arg, "32") == 0)
-	alpha_tls_size = 32;
-      else if (strcmp (arg, "64") == 0)
-	alpha_tls_size = 64;
-      else
+      if (value != 16 && value != 32 && value != 64)
 	error ("bad value %qs for -mtls-size switch", arg);
       break;
     }
Index: config/alpha/alpha.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.opt,v
retrieving revision 1.2
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.2 alpha.opt
--- config/alpha/alpha.opt	17 Mar 2005 15:59:05 -0000	1.2
+++ config/alpha/alpha.opt	25 May 2005 17:54:57 -0000
@@ -107,29 +107,29 @@ Target Report RejectNegative InverseMask
 Use 64-bit long double
 
 mcpu=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_cpu_string)
 Use features of and schedule given CPU
 
 mtune=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_tune_string)
 Schedule given CPU
 
 mfp-rounding-mode=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_fprm_string)
 Control the generated fp rounding mode
 
 mfp-trap-mode=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_fptm_string)
 Control the IEEE trap mode
 
 mtrap-precision=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_tp_string)
 Control the precision given to fp exceptions
 
 mmemory-latency=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(alpha_mlat_string)
 Tune expected memory latency
 
 mtls-size=
-Target RejectNegative Joined
+Target RejectNegative Joined UInteger Var(alpha_tls_size) Init(32)
 Specify bit size of immediate TLS offsets
Index: config/arc/arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.69
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.69 arc.c
--- config/arc/arc.c	5 May 2005 11:06:13 -0000	1.69
+++ config/arc/arc.c	25 May 2005 17:54:58 -0000
@@ -45,7 +45,6 @@ Boston, MA 02111-1307, USA.  */
 #include "target-def.h"
 
 /* Which cpu we're compiling for.  */
-static const char *arc_cpu_string = "base";
 int arc_cpu_type;
 
 /* Name of mangle string to add to symbols to separate code compiled for each
@@ -56,12 +55,6 @@ const char *arc_mangle_cpu;
    generate a scc or bcc insn.  */
 rtx arc_compare_op0, arc_compare_op1;
 
-/* Name of text, data, and rodata sections, as specified on command line.
-   Selected by -m{text,data,rodata} flags.  */
-static const char *arc_text_string = ARC_DEFAULT_TEXT_SECTION;
-static const char *arc_data_string = ARC_DEFAULT_DATA_SECTION;
-static const char *arc_rodata_string = ARC_DEFAULT_RODATA_SECTION;
-
 /* Name of text, data, and rodata sections used in varasm.c.  */
 const char *arc_text_section;
 const char *arc_data_section;
@@ -163,24 +156,7 @@ arc_handle_option (size_t code, const ch
   switch (code)
     {
     case OPT_mcpu_:
-      if (strcmp (arg, "base") == 0 || ARC_EXTENSION_CPU (arg))
-	{
-	  arc_cpu_string = arg;
-	  return true;
-	}
-      return false;
-
-    case OPT_mtext_:
-      arc_text_string = arg;
-      return true;
-
-    case OPT_mdata_:
-      arc_data_string = arg;
-      return true;
-
-    case OPT_mrodata_:
-      arc_rodata_string = arg;
-      return true;
+      return strcmp (arg, "base") == 0 || ARC_EXTENSION_CPU (arg);
 
     default:
       return true;
Index: config/arc/arc.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.opt,v
retrieving revision 1.2
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.2 arc.opt
--- config/arc/arc.opt	17 Mar 2005 15:59:07 -0000	1.2
+++ config/arc/arc.opt	25 May 2005 17:54:58 -0000
@@ -39,17 +39,17 @@ mno-cond-exec
 Target Undocumented Report RejectNegative Mask(NO_COND_EXEC)
 
 mcpu=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(arc_cpu_string) Init("base")
 -mcpu=CPU	Compile code for ARC variant CPU
 
 mtext=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(arc_text_string) Init(ARC_DEFAULT_TEXT_SECTION)
 -mtext=SECTION	Put functions in SECTION
 
 mdata=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(arc_data_string) Init(ARC_DEFAULT_DATA_SECTION)
 -mdata=SECTION	Put data in SECTION
 
 mrodata=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(arc_rodata_string) Init(ARC_DEFAULT_RODATA_SECTION)
 -mrodata=SECTION	Put read-only data in SECTION
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.460
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.460 arm.c
--- config/arm/arm.c	15 May 2005 18:29:32 -0000	1.460
+++ config/arm/arm.c	25 May 2005 17:55:01 -0000
@@ -374,20 +374,7 @@ enum float_abi_type arm_float_abi;
 /* Which ABI to use.  */
 enum arm_abi_type arm_abi;
 
-/* Set by the -mfpu=... option.  */
-static const char * target_fpu_name = NULL;
-
-/* Set by the -mfpe=... option.  */
-static const char * target_fpe_name = NULL;
-
-/* Set by the -mfloat-abi=... option.  */
-static const char * target_float_abi_name = NULL;
-
-/* Set by the -mabi=... option.  */
-static const char * target_abi_name = NULL;
-
 /* Used to parse -mstructure_size_boundary command line option.  */
-static const char * structure_size_string = NULL;
 int    arm_structure_size_boundary = DEFAULT_STRUCTURE_SIZE_BOUNDARY;
 
 /* Used for Thumb call_via trampolines.  */
@@ -498,7 +485,6 @@ int arm_cpp_interwork = 0;
 enum machine_mode output_memory_reference_mode;
 
 /* The register number to be used for the PIC offset register.  */
-static const char * arm_pic_register_string = NULL;
 int arm_pic_register = INVALID_REGNUM;
 
 /* Set to 1 when a return insn is output, this means that the epilogue
@@ -801,10 +787,6 @@ arm_handle_option (size_t code, const ch
 {
   switch (code)
     {
-    case OPT_mabi_:
-      target_abi_name = arg;
-      return true;
-
     case OPT_march_:
       arm_select[1].string = arg;
       return true;
@@ -813,35 +795,14 @@ arm_handle_option (size_t code, const ch
       arm_select[0].string = arg;
       return true;
 
-    case OPT_mfloat_abi_:
-      target_float_abi_name = arg;
-      return true;
-
-    case OPT_mfp_:
-    case OPT_mfpe_:
-      target_fpe_name = arg;
-      return true;
-
-    case OPT_mfpu_:
-      target_fpu_name = arg;
-      return true;
-
     case OPT_mhard_float:
       target_float_abi_name = "hard";
       return true;
 
-    case OPT_mpic_register_:
-      arm_pic_register_string = arg;
-      return true;
-
     case OPT_msoft_float:
       target_float_abi_name = "soft";
       return true;
 
-    case OPT_mstructure_size_boundary_:
-      structure_size_string = arg;
-      return true;
-
     case OPT_mtune_:
       arm_select[2].string = arg;
       return true;
Index: config/arm/arm.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 arm.opt
--- config/arm/arm.opt	5 May 2005 12:08:59 -0000	1.1
+++ config/arm/arm.opt	25 May 2005 17:55:01 -0000
@@ -20,7 +20,7 @@
 ; 02111-1307, USA.
 
 mabi=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(target_abi_name)
 Specify an ABI
 
 mabort-on-noreturn
@@ -73,21 +73,21 @@ Target RejectNegative Joined
 Specify the name of the target CPU
 
 mfloat-abi=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(target_float_abi_name)
 Specify if floating point hardware should be used
 
 mfp=
-Target RejectNegative Joined Undocumented
+Target RejectNegative Joined Undocumented Var(target_fpe_name) VarExists
 
 ;; Now ignored.
 mfpe
 Target RejectNegative Mask(FPE) Undocumented
 
 mfpe=
-Target RejectNegative Joined Undocumented
+Target RejectNegative Joined Undocumented Var(target_fpe_name)
 
 mfpu=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(target_fpu_name)
 Specify the name of the target floating point hardware/format
 
 mhard-float
@@ -103,7 +103,7 @@ Target Report Mask(LONG_CALLS)
 Generate call insns as indirect calls, if necessary
 
 mpic-register=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(arm_pic_register_string)
 Specify the register to be used for PIC addressing
 
 mpoke-function-name
@@ -123,7 +123,7 @@ Target RejectNegative
 Alias for -mfloat-abi=soft
 
 mstructure-size-boundary=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(structure_size_string)
 Specify the minimum bit alignment of structures
 
 mthumb
Index: config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.135
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.135 avr.c
--- config/avr/avr.c	5 May 2005 15:42:03 -0000	1.135
+++ config/avr/avr.c	25 May 2005 17:55:02 -0000
@@ -48,7 +48,6 @@
 /* Maximal allowed offset for an address in the LD command */
 #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE))
 
-static bool avr_handle_option (size_t, const char *, int);
 static int avr_naked_function_p (tree);
 static int interrupt_function_p (tree);
 static int signal_function_p (tree);
@@ -111,12 +110,6 @@ static int epilogue_size;
 /* Size of all jump tables in the current function, in words.  */
 static int jump_tables_size;
 
-/* Initial stack value specified by the `-minit-stack=' option */
-static const char *avr_init_stack = "__stack";
-
-/* Default MCU name */
-static const char *avr_mcu_name = "avr2";
-
 /* Preprocessor macros to define depending on MCU type.  */
 const char *avr_base_arch_macro;
 const char *avr_extra_arch_macro;
@@ -245,8 +238,6 @@ #define TARGET_ASM_FUNCTION_EPILOGUE avr
 #define TARGET_ATTRIBUTE_TABLE avr_attribute_table
 #undef TARGET_ASM_FUNCTION_RODATA_SECTION
 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
-#undef TARGET_HANDLE_OPTION
-#define TARGET_HANDLE_OPTION avr_handle_option
 #undef TARGET_INSERT_ATTRIBUTES
 #define TARGET_INSERT_ATTRIBUTES avr_insert_attributes
 #undef TARGET_SECTION_TYPE_FLAGS
@@ -266,26 +257,6 @@ #define TARGET_STRICT_ARGUMENT_NAMING ho
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 
-/* Implement TARGET_HANDLE_OPTION.  */
-
-static bool
-avr_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
-{
-  switch (code)
-    {
-    case OPT_minit_stack_:
-      avr_init_stack = arg;
-      return true;
-
-    case OPT_mmcu_:
-      avr_mcu_name = arg;
-      return true;
-
-    default:
-      return true;
-    }
-}
-
 void
 avr_override_options (void)
 {
Index: config/avr/avr.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 avr.opt
--- config/avr/avr.opt	19 Mar 2005 08:54:37 -0000	1.1
+++ config/avr/avr.opt	25 May 2005 17:55:02 -0000
@@ -24,14 +24,14 @@ Target Report Mask(CALL_PROLOGUES)
 Use subroutines for function prologues and epilogues
 
 mmcu=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(avr_mcu_name) Init("avr2")
 -mmcu=MCU	Select the target MCU
 
 mdeb
 Target Report Undocumented Mask(ALL_DEBUG)
 
 minit-stack=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(avr_init_stack) Init("__stack")
 -minit-stack=STACK	Use STACK as the initial value of the stack pointer
 
 mint8
Index: config/bfin/bfin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/bfin/bfin.c,v
retrieving revision 1.7
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.7 bfin.c
--- config/bfin/bfin.c	19 May 2005 08:42:26 -0000	1.7
+++ config/bfin/bfin.c	25 May 2005 17:55:03 -0000
@@ -67,8 +67,6 @@ const char *byte_reg_names[]   =  BYTE_R
 
 static int arg_regs[] = FUNCTION_ARG_REGISTERS;
 
-/* The value passed to -mshared-library-id=.  */
-static int bfin_library_id;
 /* Nonzero if -mshared-library-id was given.  */
 static int bfin_lib_id_given;
 
@@ -1722,8 +1720,6 @@ bfin_handle_option (size_t code, const c
       if (value > MAX_LIBRARY_ID)
 	error ("-mshared-library-id=%s is not between 0 and %d",
 	       arg, MAX_LIBRARY_ID);
-      else
-	bfin_library_id = value;
       bfin_lib_id_given = 1;
       return true;
 
Index: config/bfin/bfin.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/bfin/bfin.opt,v
retrieving revision 1.3
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.3 bfin.opt
--- config/bfin/bfin.opt	13 Apr 2005 08:29:46 -0000	1.3
+++ config/bfin/bfin.opt	25 May 2005 17:55:03 -0000
@@ -36,5 +36,5 @@ Target Report Mask(ID_SHARED_LIBRARY)
 Enabled ID based shared library
 
 mshared-library-id=
-Target RejectNegative Joined UInteger
+Target RejectNegative Joined UInteger Var(bfin_library_id)
 ID of shared library to build
Index: config/c4x/c4x.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.h,v
retrieving revision 1.154
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.154 c4x.h
--- config/c4x/c4x.h	28 Apr 2005 05:38:37 -0000	1.154
+++ config/c4x/c4x.h	25 May 2005 17:55:04 -0000
@@ -121,7 +121,6 @@ #define ENDFILE_SPEC ""
    RPTS blocks interrupts.  */
 
 
-extern int c4x_rpts_cycles;	        /* Max cycles for RPTS.  */
 extern int c4x_cpu_version;		/* Cpu version C30/31/32/33/40/44.  */
 
 #define TARGET_INLINE		(! optimize_size) /* Inline MPYI.  */
Index: config/c4x/c4x.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.c,v
retrieving revision 1.168
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.168 c4x.c
--- config/c4x/c4x.c	28 Apr 2005 05:38:36 -0000	1.168
+++ config/c4x/c4x.c	25 May 2005 17:55:04 -0000
@@ -153,7 +153,6 @@ enum machine_mode c4x_caller_save_map[FI
 rtx c4x_compare_op0;
 rtx c4x_compare_op1;
 
-int c4x_rpts_cycles = 0;	/* Max. cycles for RPTS.  */
 int c4x_cpu_version = 40;	/* CPU version C30/31/32/33/40/44.  */
 
 /* Pragma definitions.  */
@@ -291,10 +290,6 @@ c4x_handle_option (size_t code, const ch
 	}
       return false;
 
-    case OPT_mrpts_:
-      c4x_rpts_cycles = value;
-      return true;
-
     default:
       return true;
     }
Index: config/c4x/c4x.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 c4x.opt
--- config/c4x/c4x.opt	30 Mar 2005 06:30:13 -0000	1.1
+++ config/c4x/c4x.opt	25 May 2005 17:55:04 -0000
@@ -128,7 +128,7 @@ Target Report Mask(RPTS)
 Enable use of RTPS instruction
 
 mrpts=
-Target RejectNegative Joined UInteger
+Target RejectNegative Joined UInteger Var(c4x_rpts_cycles)
 -mrpts=N	Set the maximum number of iterations for RPTS to N
 
 msmall
Index: config/cris/aout.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/aout.h,v
retrieving revision 1.17
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.17 aout.h
--- config/cris/aout.h	23 Apr 2005 14:03:52 -0000	1.17
+++ config/cris/aout.h	25 May 2005 17:55:05 -0000
@@ -94,10 +94,6 @@ #define CRIS_SUBTARGET_HANDLE_OPTION(COD
 		+ MASK_ALIGN_BY_32);			\
 	  break;					\
 							\
-	case OPT_melinux_stacksize_:			\
-	  cris_elinux_stacksize_str = (ARG);		\
-	  break;					\
-							\
 	default:					\
 	  break;					\
 	}						\
Index: config/cris/aout.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/aout.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 aout.opt
--- config/cris/aout.opt	23 Apr 2005 14:03:52 -0000	1.1
+++ config/cris/aout.opt	25 May 2005 17:55:05 -0000
@@ -27,6 +27,8 @@ melinux
 Target Report RejectNegative
 Compile for the MMU-less Etrax 100-based elinux system
 
+;; We don't parse it currently; it's just passed on to the linker.
+;; We might want to do something here someday.
 melinux-stacksize=
-Target Report RejectNegative Joined
+Target Report RejectNegative Joined Var(cris_elinux_stacksize_str)
 -melinux-stacksize=SIZE	For elinux, request a specified stack-size for this program
Index: config/cris/cris.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.h,v
retrieving revision 1.94
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.94 cris.h
--- config/cris/cris.h	17 May 2005 00:07:54 -0000	1.94
+++ config/cris/cris.h	25 May 2005 17:55:05 -0000
@@ -75,23 +75,9 @@ #define CRIS_FUNCTION_ARG_SIZE(MODE, TYP
   ((MODE) != BLKmode ? GET_MODE_SIZE (MODE)	\
    : (unsigned) int_size_in_bytes (TYPE))
 
-/* Check for max allowed stackframe. A "const char *" to be parsed.  */
-extern const char *cris_max_stackframe_str;
-
-/* Which CPU version this is.  A "const char *" to be parsed.  */
-extern const char *cris_cpu_str;
-
 /* Which CPU version this is.  The parsed and adjusted cris_cpu_str.  */
 extern int cris_cpu_version;
 
-/* Which CPU version to tune for.  A "const char *" to be parsed.  */
-extern const char *cris_tune_str;
-
-/* The argument to "-melinux-stacksize=".  We don't parse it currently;
-   it's just passed on to the linker.  We might want to do something
-   here someday.  */
-extern const char *cris_elinux_stacksize_str;
-
 /* Changing the order used to be necessary to put the fourth __make_dp
    argument (a DImode parameter) in registers, to fit with the libfunc
    parameter passing scheme used for intrinsic functions.  FIXME: Check
Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.76
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.76 cris.c
--- config/cris/cris.c	13 May 2005 17:08:29 -0000	1.76
+++ config/cris/cris.c	25 May 2005 17:55:06 -0000
@@ -132,18 +132,6 @@ static tree cris_md_asm_clobbers (tree, 
 
 static bool cris_handle_option (size_t, const char *, int);
 
-/* This is the argument from the "-max-stack-stackframe=" option.  */
-const char *cris_max_stackframe_str;
-
-/* This is the argument from the "-march=" option.  */
-const char *cris_cpu_str;
-
-/* This is the argument from the "-mtune=" option.  */
-const char *cris_tune_str;
-
-/* This is the argument from the "-melinux-stacksize=" option.  */
-const char *cris_elinux_stacksize_str;
-
 /* This is the parsed result of the "-max-stack-stackframe=" option.  If
    it (still) is zero, then there was no such option given.  */
 int cris_max_stackframe = 0;
@@ -2073,20 +2061,6 @@ cris_handle_option (size_t code, const c
 	     + MASK_DATA_ALIGN);
       break;
 
-    case OPT_max_stackframe_:
-    case OPT_mmax_stackframe_:
-      cris_max_stackframe_str = arg;
-      break;
-
-    case OPT_march_:
-    case OPT_mcpu_:
-      cris_cpu_str = arg;
-      break;
-
-    case OPT_mtune_:
-      cris_tune_str = arg;
-      break;
-
     default:
       break;
     }
Index: config/cris/cris.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 cris.opt
--- config/cris/cris.opt	23 Apr 2005 14:03:53 -0000	1.1
+++ config/cris/cris.opt	25 May 2005 17:55:06 -0000
@@ -159,22 +159,22 @@ Target Report RejectNegative
 Override -mbest-lib-options
 
 mcpu=
-Target Report RejectNegative Joined Undocumented
+Target Report RejectNegative Joined Undocumented Var(cris_cpu_str)
 
 march=
-Target Report RejectNegative Joined
+Target Report RejectNegative Joined Var(cris_cpu_str) VarExists
 -march=ARCH	Generate code for the specified chip or CPU version
 
 mtune=
-Target Report RejectNegative Joined
+Target Report RejectNegative Joined Var(cris_tune_str)
 -mtune=ARCH	Tune alignment for the specified chip or CPU version
 
 mmax-stackframe=
-Target Report RejectNegative Joined
+Target Report RejectNegative Joined Var(cris_max_stackframe_str)
 -mmax-stackframe=SIZE	Warn when a stackframe is larger than the specified size
 
 max-stackframe=
-Target Report RejectNegative Joined Undocumented
+Target Report RejectNegative Joined Undocumented Var(cris_max_stackframe_str) VarExists
 
 ; TARGET_SVINTO: Currently this just affects alignment.  FIXME:
 ; Redundant with TARGET_ALIGN_BY_32, or put machine stuff here?
Index: config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.433
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.433 i386.h
--- config/i386/i386.h	3 May 2005 17:00:49 -0000	1.433
+++ config/i386/i386.h	25 May 2005 17:55:07 -0000
@@ -2132,10 +2132,7 @@ enum processor_type
 };
 
 extern enum processor_type ix86_tune;
-extern const char *ix86_tune_string;
-
 extern enum processor_type ix86_arch;
-extern const char *ix86_arch_string;
 
 enum fpmath_unit
 {
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.820
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.820 i386.c
--- config/i386/i386.c	7 May 2005 14:43:53 -0000	1.820
+++ config/i386/i386.c	25 May 2005 17:55:12 -0000
@@ -787,15 +787,11 @@ struct ix86_frame
   bool save_regs_using_mov;
 };
 
-/* Code model option as passed by user.  */
-static const char *ix86_cmodel_string;
-/* Parsed value.  */
+/* Code model option.  */
 enum cmodel ix86_cmodel;
 /* Asm dialect.  */
-static const char *ix86_asm_string;
 enum asm_dialect ix86_asm_dialect = ASM_ATT;
 /* TLS dialext.  */
-static const char *ix86_tls_dialect_string;
 enum tls_dialect ix86_tls_dialect = TLS_DIALECT_GNU;
 
 /* Which unit we are generating floating point math for.  */
@@ -806,40 +802,17 @@ enum processor_type ix86_tune;
 /* Which instruction set architecture to use.  */
 enum processor_type ix86_arch;
 
-/* Strings to hold which cpu and instruction set architecture  to use.  */
-const char *ix86_tune_string;		/* for -mtune=<xxx> */
-const char *ix86_arch_string;		/* for -march=<xxx> */
-static const char *ix86_fpmath_string;	/* for -mfpmath=<xxx> */
-
-/* # of registers to use to pass arguments.  */
-static const char *ix86_regparm_string;
-
 /* true if sse prefetch instruction is not NOOP.  */
 int x86_prefetch_sse;
 
 /* ix86_regparm_string as a number */
 static int ix86_regparm;
 
-/* Alignment to use for loops and jumps:  */
-
-/* Power of two alignment for loops.  */
-static const char *ix86_align_loops_string;
-
-/* Power of two alignment for non-loop jumps.  */
-static const char *ix86_align_jumps_string;
-
-/* Power of two alignment for stack boundary in bytes.  */
-static const char *ix86_preferred_stack_boundary_string;
-
 /* Preferred alignment for stack boundary in bits.  */
 unsigned int ix86_preferred_stack_boundary;
 
 /* Values 1-5: see jump.c */
 int ix86_branch_cost;
-static const char *ix86_branch_cost_string;
-
-/* Power of two alignment for functions.  */
-static const char *ix86_align_funcs_string;
 
 /* Prefix built by ASM_GENERATE_INTERNAL_LABEL.  */
 char internal_label_prefix[16];
@@ -1107,7 +1080,7 @@ #define DEFAULT_PCC_STRUCT_RETURN 1
 /* Implement TARGET_HANDLE_OPTION.  */
 
 static bool
-ix86_handle_option (size_t code, const char *arg, int value)
+ix86_handle_option (size_t code, const char *arg ATTRIBUTE_UNUSED, int value)
 {
   switch (code)
     {
@@ -1119,38 +1092,6 @@ ix86_handle_option (size_t code, const c
 	}
       return true;
 
-    case OPT_malign_functions_:
-      ix86_align_funcs_string = arg;
-      return true;
-
-    case OPT_malign_jumps_:
-      ix86_align_jumps_string = arg;
-      return true;
-
-    case OPT_malign_loops_:
-      ix86_align_loops_string = arg;
-      return true;
-
-    case OPT_march_:
-      ix86_arch_string = arg;
-      return true;
-
-    case OPT_masm_:
-      ix86_asm_string = arg;
-      return true;
-
-    case OPT_mbranch_cost_:
-      ix86_branch_cost_string = arg;
-      return true;
-
-    case OPT_mcmodel_:
-      ix86_cmodel_string = arg;
-      return true;
-
-    case OPT_mfpmath_:
-      ix86_fpmath_string = arg;
-      return true;
-
     case OPT_mmmx:
       if (!value)
 	{
@@ -1159,14 +1100,6 @@ ix86_handle_option (size_t code, const c
 	}
       return true;
 
-    case OPT_mpreferred_stack_boundary_:
-      ix86_preferred_stack_boundary_string = arg;
-      return true;
-
-    case OPT_mregparm_:
-      ix86_regparm_string = arg;
-      return true;
-
     case OPT_msse:
       if (!value)
 	{
@@ -1183,14 +1116,6 @@ ix86_handle_option (size_t code, const c
 	}
       return true;
 
-    case OPT_mtls_dialect_:
-      ix86_tls_dialect_string = arg;
-      return true;
-
-    case OPT_mtune_:
-      ix86_tune_string = arg;
-      return true;
-
     default:
       return true;
     }
Index: config/i386/i386.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 i386.opt
--- config/i386/i386.opt	21 Apr 2005 07:35:08 -0000	1.1
+++ config/i386/i386.opt	25 May 2005 17:55:12 -0000
@@ -60,15 +60,15 @@ Target Report Mask(ALIGN_DOUBLE)
 Align some doubles on dword boundary
 
 malign-functions=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_align_funcs_string)
 Function starts are aligned to this power of 2
 
 malign-jumps=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_align_jumps_string)
 Jump targets are aligned to this power of 2
 
 malign-loops=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_align_loops_string)
 Loop code aligned to this power of 2
 
 malign-stringops
@@ -76,19 +76,19 @@ Target RejectNegative Report InverseMask
 Align destination of the string operations
 
 march=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_arch_string)
 Generate code for given CPU
 
 masm=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_asm_string)
 Use given assembler dialect
 
 mbranch-cost=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_branch_cost_string)
 Branches are this expensive (1-5, arbitrary units)
 
 mcmodel=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_cmodel_string)
 Use given x86-64 code model
 
 mdebug-addr
@@ -106,7 +106,7 @@ Target Report Mask(FLOAT_RETURNS)
 Return values of functions in FPU registers
 
 mfpmath=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_fpmath_string)
 Generate floating point mathematics using given instruction set
 
 mhard-float
@@ -158,7 +158,7 @@ Target RejectNegative Undocumented
 ;; Deprecated
 
 mpreferred-stack-boundary=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_preferred_stack_boundary_string)
 Attempt to keep stack aligned to this power of 2
 
 mpush-args
@@ -170,7 +170,7 @@ Target RejectNegative Report InverseMask
 Use red-zone in the x86-64 code
 
 mregparm=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_regparm_string)
 Number of registers used to pass integer arguments
 
 mrtd
@@ -202,7 +202,7 @@ Target Report Mask(STACK_PROBE)
 Enable stack probing
 
 mtls-dialect=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_tls_dialect_string)
 Use given thread-local storage dialect
 
 mtls-direct-seg-refs
@@ -210,7 +210,7 @@ Target Report Mask(TLS_DIRECT_SEG_REFS)
 Use direct references against %gs when accessing tls data
 
 mtune=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(ix86_tune_string)
 Schedule code for given CPU
 
 ;; Support Athlon 3Dnow builtins
Index: config/ia64/ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.198
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.198 ia64.h
--- config/ia64/ia64.h	11 May 2005 21:34:18 -0000	1.198
+++ config/ia64/ia64.h	25 May 2005 17:55:12 -0000
@@ -67,7 +67,6 @@ extern unsigned int ia64_section_thresho
 #define TARGET_HAVE_TLS true
 #endif
 
-extern int ia64_tls_size;
 #define TARGET_TLS14		(ia64_tls_size == 14)
 #define TARGET_TLS22		(ia64_tls_size == 22)
 #define TARGET_TLS64		(ia64_tls_size == 64)
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.366
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.366 ia64.c
--- config/ia64/ia64.c	19 May 2005 09:42:23 -0000	1.366
+++ config/ia64/ia64.c	25 May 2005 17:55:13 -0000
@@ -98,10 +98,6 @@ static const char * const ia64_local_reg
 static const char * const ia64_output_reg_names[8] =
 { "out0", "out1", "out2", "out3", "out4", "out5", "out6", "out7" };
 
-/* Determines whether we use adds, addl, or movl to generate our
-   TLS immediate offsets.  */
-int ia64_tls_size = 22;
-
 /* Which cpu are we scheduling for.  */
 enum processor_type ia64_tune = PROCESSOR_ITANIUM2;
 
@@ -4821,7 +4817,7 @@ fix_range (const char *const_str)
 /* Implement TARGET_HANDLE_OPTION.  */
 
 static bool
-ia64_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
+ia64_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
@@ -4830,15 +4826,9 @@ ia64_handle_option (size_t code, const c
       return true;
 
     case OPT_mtls_size_:
-      {
-	char *end;
-	unsigned long tmp = strtoul (arg, &end, 10);
-	if (*end || (tmp != 14 && tmp != 22 && tmp != 64))
-	  error ("bad value %<%s%> for -mtls-size= switch", arg);
-	else
-	  ia64_tls_size = tmp;
-	return true;
-      }
+      if (value != 14 && value != 22 && value != 64)
+	error ("bad value %<%s%> for -mtls-size= switch", arg);
+      return true;
 
     case OPT_mtune_:
       {
Index: config/ia64/ia64.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 ia64.opt
--- config/ia64/ia64.opt	17 Mar 2005 17:35:16 -0000	1.1
+++ config/ia64/ia64.opt	25 May 2005 17:55:13 -0000
@@ -89,7 +89,7 @@ Target RejectNegative Joined
 Specify range of registers to make fixed
 
 mtls-size=
-Target RejectNegative Joined
+Target RejectNegative Joined UInteger Var(ia64_tls_size) Init(22)
 Specify bit size of immediate TLS offsets
 
 mtune=
Index: config/m32r/m32r.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.h,v
retrieving revision 1.129
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.129 m32r.h
--- config/m32r/m32r.h	6 May 2005 10:23:03 -0000	1.129
+++ config/m32r/m32r.h	25 May 2005 17:55:14 -0000
@@ -209,10 +209,6 @@ #define TARGET_BIG_ENDIAN       (! TARGE
 #define TARGET_CPU_DEFAULT 0
 #endif
 
-/* Cache-flush support.  */
-extern const char * m32r_cache_flush_func;
-extern int m32r_cache_flush_trap;
-
 /* Code Models
 
    Code models are used to select between two choices of two separate
Index: config/m32r/m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.115
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.115 m32r.c
--- config/m32r/m32r.c	24 May 2005 07:45:24 -0000	1.115
+++ config/m32r/m32r.c	25 May 2005 17:55:15 -0000
@@ -64,18 +64,6 @@ #define SYMBOL_REF_MODEL(X) \
 /* For string literals, etc.  */
 #define LIT_NAME_P(NAME) ((NAME)[0] == '*' && (NAME)[1] == '.')
 
-/* Cache-flush support. Cache-flush is used at trampoline.
-   Default cache-flush is "trap 12".
-    default cache-flush function is "_flush_cache"  (CACHE_FLUSH_FUNC)
-    default cache-flush trap-interrupt number is 12 (CACHE_FLUSH_TRAP)
-   You can change how to generate code of cache-flush with following options.
-   -mflush-func=FLUSH-FUNC-NAME
-   -mno-flush-func              (sets m32r_cache_flush_func to NULL)
-   -mfluch-trap=TRAP-NUMBER
-   -mno-flush-trap.             (sets m32r_cache_flush_trap to -1).  */
-const char *m32r_cache_flush_func = CACHE_FLUSH_FUNC;
-int m32r_cache_flush_trap = CACHE_FLUSH_TRAP;
-
 /* Forward declaration.  */
 static bool  m32r_handle_option (size_t, const char *, int);
 static void  init_reg_tables (void);
@@ -188,17 +176,12 @@ m32r_handle_option (size_t code, const c
 	return false;
       return true;
 
-    case OPT_mflush_func_:
-      m32r_cache_flush_func = arg;
-      return true;
-
     case OPT_mno_flush_func:
       m32r_cache_flush_func = NULL;
       return true;
 
     case OPT_mflush_trap_:
-      m32r_cache_flush_trap = value;
-      return m32r_cache_flush_trap <= 15;
+      return value <= 15;
 
     case OPT_mno_flush_trap:
       m32r_cache_flush_trap = -1;
Index: config/m32r/m32r.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 m32r.opt
--- config/m32r/m32r.opt	29 Mar 2005 17:32:06 -0000	1.1
+++ config/m32r/m32r.opt	25 May 2005 17:55:15 -0000
@@ -48,11 +48,11 @@ Target Mask(DEBUG)
 Display compile time statistics
 
 mflush-func=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(m32r_cache_flush_func) Init(CACHE_FLUSH_FUNC)
 Specify cache flush function
 
 mflush-trap=
-Target RejectNegative Joined UInteger
+Target RejectNegative Joined UInteger Var(m32r_cache_flush_trap) Init(CACHE_FLUSH_TRAP)
 Specify cache flush trap number
 
 missue-rate=1
Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.393
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.393 mips.h
--- config/mips/mips.h	13 May 2005 15:24:34 -0000	1.393
+++ config/mips/mips.h	25 May 2005 17:55:16 -0000
@@ -105,7 +105,6 @@ extern enum processor_type mips_tune;   
 extern int mips_isa;			/* architectural level */
 extern int mips_abi;			/* which ABI to use */
 extern int mips16_hard_float;		/* mips16 without -msoft-float */
-extern const char *mips_cache_flush_func;/* for -mflush-func= and -mno-flush-func */
 extern const struct mips_cpu_info mips_cpu_info_table[];
 extern const struct mips_cpu_info *mips_arch_info;
 extern const struct mips_cpu_info *mips_tune_info;
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.503
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.503 mips.c
--- config/mips/mips.c	13 May 2005 15:24:29 -0000	1.503
+++ config/mips/mips.c	25 May 2005 17:55:18 -0000
@@ -555,15 +555,9 @@ int mips_abi = MIPS_ABI_DEFAULT;
    should arrange to call mips32 hard floating point code.  */
 int mips16_hard_float;
 
-/* The arguments passed to -march and -mtune.  */
-static const char *mips_arch_string;
-static const char *mips_tune_string;
-
 /* The architecture selected by -mipsN.  */
 static const struct mips_cpu_info *mips_isa_info;
 
-const char *mips_cache_flush_func = CACHE_FLUSH_FUNC;
-
 /* If TRUE, we split addresses into their high and low parts in the RTL.  */
 int mips_split_addresses;
 
@@ -4215,21 +4209,13 @@ mips_handle_option (size_t code, const c
       return true;
 
     case OPT_march_:
-      mips_arch_string = arg;
-      return mips_parse_cpu (arg) != 0;
-
     case OPT_mtune_:
-      mips_tune_string = arg;
       return mips_parse_cpu (arg) != 0;
 
     case OPT_mips:
       mips_isa_info = mips_parse_cpu (ACONCAT (("mips", arg, NULL)));
       return mips_isa_info != 0;
 
-    case OPT_mflush_func_:
-      mips_cache_flush_func = arg;
-      return true;
-
     case OPT_mno_flush_func:
       mips_cache_flush_func = NULL;
       return true;
Index: config/mips/mips.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.opt,v
retrieving revision 1.4
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 mips.opt
--- config/mips/mips.opt	6 May 2005 23:41:07 -0000	1.4
+++ config/mips/mips.opt	25 May 2005 17:55:18 -0000
@@ -32,7 +32,7 @@ Target Report Var(TARGET_MAD)
 Use PMC-style 'mad' instructions
 
 march=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(mips_arch_string)
 -march=ISA	Generate code for the given ISA
 
 mbranch-likely
@@ -114,7 +114,7 @@ Target Report RejectNegative Mask(FLOAT6
 Use 64-bit floating-point registers
 
 mflush-func=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(mips_cache_flush_func) Init(CACHE_FLUSH_FUNC)
 -mflush-func=FUNC	Use FUNC to flush the cache before calling stack trampolines
 
 mfused-madd
@@ -198,7 +198,7 @@ Target Report Var(TARGET_SYM32)
 Assume all symbols have 32-bit values
 
 mtune=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(mips_tune_string)
 -mtune=PROCESSOR	Optimize the output for PROCESSOR
 
 muninit-const-in-rodata
Index: config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.230
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.230 s390.c
--- config/s390/s390.c	23 May 2005 16:43:06 -0000	1.230
+++ config/s390/s390.c	25 May 2005 17:55:20 -0000
@@ -186,7 +186,6 @@ enum processor_flags s390_tune_flags;
 /* Which instruction set architecture to use.  */
 enum processor_type s390_arch;
 enum processor_flags s390_arch_flags;
-static const char *s390_arch_string;
 
 HOST_WIDE_INT s390_warn_framesize = 0;
 HOST_WIDE_INT s390_stack_size = 0;
@@ -1123,7 +1122,6 @@ s390_handle_option (size_t code, const c
   switch (code)
     {
     case OPT_march_:
-      s390_arch_string = arg;
       return s390_handle_arch_option (arg, &s390_arch, &s390_arch_flags);
 
     case OPT_mstack_guard_:
Index: config/s390/s390.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 s390.opt
--- config/s390/s390.opt	11 Apr 2005 14:04:07 -0000	1.1
+++ config/s390/s390.opt	25 May 2005 17:55:20 -0000
@@ -28,7 +28,7 @@ Target Report RejectNegative Mask(64BIT)
 64 bit ABI
 
 march=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(s390_arch_string)
 Generate code for given CPU
 
 mbackchain
Index: config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.283
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.283 sparc.h
--- config/sparc/sparc.h	12 May 2005 11:43:05 -0000	1.283
+++ config/sparc/sparc.h	25 May 2005 17:55:21 -0000
@@ -191,8 +191,6 @@ enum cmodel {
   CM_EMBMEDANY
 };
 
-/* Value of -mcmodel specified by user.  */
-extern const char *sparc_cmodel_string;
 /* One of CM_FOO.  */
 extern enum cmodel sparc_cmodel;
 
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.372
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.372 sparc.c
--- config/sparc/sparc.c	23 May 2005 07:09:02 -0000	1.372
+++ config/sparc/sparc.c	25 May 2005 17:55:23 -0000
@@ -370,9 +370,6 @@ const struct attribute_spec sparc_attrib
 
 /* Option handling.  */
 
-/* Code model option as passed by user.  */
-const char *sparc_cmodel_string;
-
 /* Parsed value.  */
 enum cmodel sparc_cmodel;
 
@@ -540,10 +537,6 @@ sparc_handle_option (size_t code, const 
     case OPT_mtune_:
       sparc_select[2].string = arg;
       break;
-
-    case OPT_mcmodel_:
-      sparc_cmodel_string = arg;
-      break;
     }
 
   return true;
Index: config/sparc/sparc.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.opt,v
retrieving revision 1.1
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 sparc.opt
--- config/sparc/sparc.opt	13 Apr 2005 08:47:23 -0000	1.1
+++ config/sparc/sparc.opt	25 May 2005 17:55:23 -0000
@@ -96,7 +96,7 @@ Target RejectNegative Joined
 Schedule code for given CPU
 
 mcmodel=
-Target RejectNegative Joined
+Target RejectNegative Joined Var(sparc_cmodel_string)
 Use given SPARC-V9 code model
 
 


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