This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: [PATCH] Add .set arch=FOO support to MIPS gas.


Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> writes:
> > Could you keep the mips_tune_string handling in the original place?
> > That should make it easier to compare the gas and gcc code.
> 
> What about initializing mips_tune in one place in gcc, too? With my
> patch first arch gets initialized, then tune. AFAICS there's no need
> to split it.

Well, it's all down to personal taste I guess.  I thought it seemed
natural to handle the -mtune option next to -march option.  If you
feel strongly about changing it though, could you submit a patch
to gcc?  I'd really like to see the code stay in sync.

> I tried this first, and it broke. mips_opt.isa is also needed for the
> -mipsX compatibility check.

You mean:

	  /* -march takes precedence over -mipsN, since it is more descriptive.
	     There's no harm in specifying both as long as the ISA levels
	     are the same.  */
	  if (file_mips_isa != mips_opts.isa)
	    as_bad (_("-%s conflicts with the other architecture options, which imply -%s"),
		    mips_cpu_info_from_isa (file_mips_isa)->name,
		    mips_cpu_info_from_isa (mips_opts.isa)->name);

Can't you just s/mips_opts.isa/arch_info->isa/? That seems cleaner
to me anyway now that you're using local variables.

Richard


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