aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2004-04-23 17:25:50 +0000
committerThiemo Seufer <ths@networkno.de>2004-04-23 17:25:50 +0000
commit81a21e382c59673f410292705491a086911a6a8b (patch)
tree21515982058c5cb306f996a808b2763b1624784e /gas/config
parent61bcae62f75a3075d4455ff3ba8204b50bfed75e (diff)
downloadgdb-81a21e382c59673f410292705491a086911a6a8b.zip
gdb-81a21e382c59673f410292705491a086911a6a8b.tar.gz
gdb-81a21e382c59673f410292705491a086911a6a8b.tar.bz2
* config/tc-mips.c (s_mipsset): Set default CPU type for .set mipsN.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index a8b22f2..83d0296 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -11845,34 +11845,11 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
/* Permit the user to change the ISA and architecture on the fly.
Needless to say, misuse can cause serious problems. */
- if (strcmp (name, "mips0") == 0)
+ if (strcmp (name, "mips0") == 0 || strcmp (name, "arch=default") == 0)
{
reset = 1;
mips_opts.isa = file_mips_isa;
- }
- else if (strcmp (name, "mips1") == 0)
- mips_opts.isa = ISA_MIPS1;
- else if (strcmp (name, "mips2") == 0)
- mips_opts.isa = ISA_MIPS2;
- else if (strcmp (name, "mips3") == 0)
- mips_opts.isa = ISA_MIPS3;
- else if (strcmp (name, "mips4") == 0)
- mips_opts.isa = ISA_MIPS4;
- else if (strcmp (name, "mips5") == 0)
- mips_opts.isa = ISA_MIPS5;
- else if (strcmp (name, "mips32") == 0)
- mips_opts.isa = ISA_MIPS32;
- else if (strcmp (name, "mips32r2") == 0)
- mips_opts.isa = ISA_MIPS32R2;
- else if (strcmp (name, "mips64") == 0)
- mips_opts.isa = ISA_MIPS64;
- else if (strcmp (name, "mips64r2") == 0)
- mips_opts.isa = ISA_MIPS64R2;
- else if (strcmp (name, "arch=default") == 0)
- {
- reset = 1;
mips_opts.arch = file_mips_arch;
- mips_opts.isa = file_mips_isa;
}
else if (strncmp (name, "arch=", 5) == 0)
{
@@ -11887,8 +11864,21 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
mips_opts.isa = p->isa;
}
}
+ else if (strncmp (name, "mips", 4) == 0)
+ {
+ const struct mips_cpu_info *p;
+
+ p = mips_parse_cpu("internal use", name);
+ if (!p)
+ as_bad (_("unknown ISA level %s"), name + 4);
+ else
+ {
+ mips_opts.arch = p->cpu;
+ mips_opts.isa = p->isa;
+ }
+ }
else
- as_bad (_("unknown ISA level %s"), name + 4);
+ as_bad (_("unknown ISA or architecture %s"), name);
switch (mips_opts.isa)
{