aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2003-06-30 21:54:19 +0000
committerChris Demetriou <cgd@google.com>2003-06-30 21:54:19 +0000
commit1a2c1fadc945fef1eecee175c56b63ed49f424ba (patch)
tree191520ed42953064d402b1d190bd10a799deb392 /gas
parent1ad828f1985eff39fbe4088d2a30c2f065ebc562 (diff)
downloadbinutils-1a2c1fadc945fef1eecee175c56b63ed49f424ba.zip
binutils-1a2c1fadc945fef1eecee175c56b63ed49f424ba.tar.gz
binutils-1a2c1fadc945fef1eecee175c56b63ed49f424ba.tar.bz2
2003-06-30 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (s_mipsset): Implement -march= handling differently.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c66
2 files changed, 27 insertions, 44 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c14d993..e97f705 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-30 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c (s_mipsset): Implement -march= handling
+ differently.
+
2003-06-30 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c: Convert to ISO C90 prototypes. Remove unnecessary
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 53af88b..b66aae4 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -11945,12 +11945,12 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
mips_opts.ase_mdmx = 1;
else if (strcmp (name, "nomdmx") == 0)
mips_opts.ase_mdmx = 0;
- else if (strncmp (name, "mips", 4) == 0)
+ else if (strncmp (name, "mips", 4) == 0 || strncmp (name, "arch=", 5) == 0)
{
int reset = 0;
- /* Permit the user to change the ISA on the fly. Needless to
- say, misuse can cause serious problems. */
+ /* 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)
{
reset = 1;
@@ -11972,6 +11972,25 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
mips_opts.isa = ISA_MIPS32R2;
else if (strcmp (name, "mips64") == 0)
mips_opts.isa = ISA_MIPS64;
+ 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)
+ {
+ const struct mips_cpu_info *p;
+
+ p = mips_parse_cpu("internal use", name + 5);
+ if (!p)
+ as_bad (_("unknown architecture %s"), name + 5);
+ else
+ {
+ mips_opts.arch = p->cpu;
+ mips_opts.isa = p->isa;
+ }
+ }
else
as_bad (_("unknown ISA level %s"), name + 4);
@@ -12044,47 +12063,6 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
free (s);
}
}
- else if (strncmp (name, "arch=", 5) == 0)
- {
- /* Permit the user to change the architecture on the fly. Needless
- to say, misuse can cause serious problems. */
- if (strcmp (name + 5, "default") == 0)
- {
- mips_opts.arch = file_mips_arch;
- mips_opts.isa = file_mips_isa;
- mips_opts.gp32 = file_mips_gp32;
- mips_opts.fp32 = file_mips_fp32;
- }
- else
- {
- const struct mips_cpu_info *p;
-
- p = mips_parse_cpu("internal use", name + 5);
- if (!p)
- as_bad (_("unknown architecture %s"), name + 5);
- else
- {
- mips_opts.arch = p->cpu;
- mips_opts.isa = p->isa;
- }
-
- switch (mips_opts.arch)
- {
- case CPU_R3000:
- case CPU_R3900:
- case CPU_R6000:
- case CPU_MIPS32:
- case CPU_MIPS32R2:
- mips_opts.gp32 = 1;
- mips_opts.fp32 = 1;
- break;
- default:
- mips_opts.gp32 = 0;
- mips_opts.fp32 = 0;
- break;
- }
- }
- }
else
{
as_warn (_("Tried to set unrecognized symbol: %s\n"), name);