This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch: mips gas reorg
- To: Eric Christopher <echristo at redhat dot com>
- Subject: Re: Patch: mips gas reorg
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- Date: Wed, 4 Jul 2001 15:19:12 +0200
- Cc: binutils at sources dot redhat dot com
Eric Christopher wrote:
[snip]
> Ok with one exception:
>
> > + /* Backward compatibility for historic -mcpu= option. Warn. */
>
> as_fatal isn't much of a warning... :)
It warns if it can use -mcpu. It does as_fatal if it can't.
Ok, I'm a bit lazy about commenting source. :-) Fixed.
Thiemo
2001-07-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/gas/ChangeLog
* config/tc-mips.c (md_begin): Take -mcpu value into account even when
-mipsX is specified. Make both -mcpu/-march and -mcpu/-mtune pairs
mutually exclusive.
(md_parse_option): Remove superfluous setting of mips_tune, this is
done in md_begin anyway.
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/config/tc-mips.c src/gas/config/tc-mips.c
--- src-orig/gas/config/tc-mips.c Wed Jul 4 14:44:12 2001
+++ src/gas/config/tc-mips.c Wed Jul 4 15:09:09 2001
@@ -939,6 +967,29 @@
if (mips_opts.mips16 < 0)
mips_opts.mips16 = target_cpu_had_mips16;
+ /* Backward compatibility for historic -mcpu= option. Check for
+ incompatible options, warn if -mcpu is used. */
+ if (mips_cpu != CPU_UNKNOWN && mips_arch != CPU_UNKNOWN)
+ {
+ as_fatal (_("The -mcpu option can't be used together with -march. "
+ "Use -mtune instead of -mcpu."));
+ }
+
+ if (mips_cpu != CPU_UNKNOWN && mips_tune != CPU_UNKNOWN)
+ {
+ as_fatal (_("The -mcpu option can't be used together with -mtune. "
+ "Use -march instead of -mcpu."));
+ }
+
+ if (mips_arch == CPU_UNKNOWN && mips_cpu != CPU_UNKNOWN)
+ {
+ ci = mips_cpu_info_from_cpu (mips_cpu);
+ assert (ci != NULL);
+ mips_arch = ci->cpu;
+ as_warn (_("The -mcpu option is deprecated. Please use -march and "
+ "-mtune instead."));
+ }
+
/* At this point, mips_arch will either be CPU_UNKNOWN if no ARCH was
specified on the command line, or some other value if one was.
Similarly, mips_opts.isa will be ISA_UNKNOWN if not specified on
@@ -961,19 +1012,6 @@
assert (ci != NULL);
mips_arch = ci->cpu;
}
- else if (mips_arch == CPU_UNKNOWN
- && mips_opts.isa == ISA_UNKNOWN
- && mips_cpu != CPU_UNKNOWN)
- {
- /* Historic -mcpu= option. Warn. */
- ci = mips_cpu_info_from_cpu (mips_cpu);
- assert (ci != NULL);
- mips_arch = ci->cpu;
- mips_tune = ci->cpu;
- mips_opts.isa = ci->isa;
- as_warn (_("The -mcpu option is deprecated. Please use -march and -mtune instead."));
-
- }
else
{
/* We need to set both ISA and ARCH from target cpu. */
@@ -9093,7 +9230,6 @@
case OPTION_M4650:
mips_arch = CPU_R4650;
- mips_tune = CPU_R4650;
break;
case OPTION_NO_M4650:
@@ -9101,7 +9237,6 @@
case OPTION_M4010:
mips_arch = CPU_R4010;
- mips_tune = CPU_R4010;
break;
case OPTION_NO_M4010:
@@ -9109,7 +9244,6 @@
case OPTION_M4100:
mips_arch = CPU_VR4100;
- mips_tune = CPU_VR4100;
break;
case OPTION_NO_M4100:
@@ -9117,7 +9251,6 @@
case OPTION_M3900:
mips_arch = CPU_R3900;
- mips_tune = CPU_R3900;
break;
case OPTION_NO_M3900: