aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-10-25 18:47:09 +0000
committerIan Lance Taylor <ian@airs.com>1994-10-25 18:47:09 +0000
commit4bb0cc41f2fb5d838459c90926c0283c7d193857 (patch)
treee0c6423d672d691a47e138fc72905aac59a3f992 /gas
parent870ae9e6edaf9a55fc8801345bfe16dd16a4e71e (diff)
downloadgdb-4bb0cc41f2fb5d838459c90926c0283c7d193857.zip
gdb-4bb0cc41f2fb5d838459c90926c0283c7d193857.tar.gz
gdb-4bb0cc41f2fb5d838459c90926c0283c7d193857.tar.bz2
* config/tc-mips.c (mips_cpu): Initialize to -1.
(md_begin): Don't mips_cpu if it was already set. (md_parse_option): For -mipsN, don't set mips_cpu if it was already set. For -mcpu=, just set mips_cpu, not mips_isa.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-mips.c70
2 files changed, 36 insertions, 41 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a589c55..74b0c09 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+Tue Oct 25 14:44:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (mips_cpu): Initialize to -1.
+ (md_begin): Don't mips_cpu if it was already set.
+ (md_parse_option): For -mipsN, don't set mips_cpu if it was
+ already set. For -mcpu=, just set mips_cpu, not mips_isa.
+
Fri Oct 21 20:42:29 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* config/tc-mips.c (md_pseudo_table): If OBJ_ELF, handle .section.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 0fc795d..d604a42 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -116,7 +116,7 @@ static int mips_isa = -1;
static int file_mips_isa;
/* The CPU type as a number: 2000, 3000, 4000, 4400, etc. */
-static int mips_cpu;
+static int mips_cpu = -1;
/* MIPS PIC level. */
@@ -530,36 +530,42 @@ md_begin ()
if (strcmp (cpu, "mips") == 0)
{
mips_isa = 1;
- mips_cpu = 3000;
+ if (mips_cpu == -1)
+ mips_cpu = 3000;
}
else if (strcmp (cpu, "r6000") == 0
|| strcmp (cpu, "mips2") == 0)
{
mips_isa = 2;
- mips_cpu = 6000;
+ if (mips_cpu == -1)
+ mips_cpu = 6000;
}
else if (strcmp (cpu, "mips64") == 0
|| strcmp (cpu, "r4000") == 0
|| strcmp (cpu, "mips3") == 0)
{
mips_isa = 3;
- mips_cpu = 4000;
+ if (mips_cpu == -1)
+ mips_cpu = 4000;
}
else if (strcmp (cpu, "r4400") == 0)
{
mips_isa = 3;
- mips_cpu = 4400;
+ if (mips_cpu == -1)
+ mips_cpu = 4400;
}
else if (strcmp (cpu, "mips64orion") == 0
|| strcmp (cpu, "r4600") == 0)
{
mips_isa = 3;
- mips_cpu = 4600;
+ if (mips_cpu == -1)
+ mips_cpu = 4600;
}
else
{
mips_isa = 1;
- mips_cpu = 3000;
+ if (mips_cpu == -1)
+ mips_cpu = 3000;
}
if (a != NULL)
@@ -5055,17 +5061,20 @@ md_parse_option (c, arg)
case OPTION_MIPS1:
mips_isa = 1;
- mips_cpu = 3000;
+ if (mips_cpu == -1)
+ mips_cpu = 3000;
break;
case OPTION_MIPS2:
mips_isa = 2;
- mips_cpu = 6000;
+ if (mips_cpu == -1)
+ mips_cpu = 6000;
break;
case OPTION_MIPS3:
mips_isa = 3;
- mips_cpu = 4000;
+ if (mips_cpu == -1)
+ mips_cpu = 4000;
break;
case OPTION_MCPU:
@@ -5076,75 +5085,54 @@ md_parse_option (c, arg)
p = arg;
if (strcmp (p, "default") == 0
|| strcmp (p, "DEFAULT") == 0)
- mips_isa = -1;
+ mips_cpu = -1;
else
{
if (*p == 'r' || *p == 'R')
p++;
- mips_isa = -1;
+ mips_cpu = -1;
switch (*p)
{
case '2':
if (strcmp (p, "2000") == 0
|| strcmp (p, "2k") == 0
|| strcmp (p, "2K") == 0)
- {
- mips_isa = 1;
- mips_cpu = 2000;
- }
+ mips_cpu = 2000;
break;
case '3':
if (strcmp (p, "3000") == 0
|| strcmp (p, "3k") == 0
|| strcmp (p, "3K") == 0)
- {
- mips_isa = 1;
- mips_cpu = 3000;
- }
+ mips_cpu = 3000;
break;
case '4':
if (strcmp (p, "4000") == 0
|| strcmp (p, "4k") == 0
|| strcmp (p, "4K") == 0)
- {
- mips_isa = 3;
- mips_cpu = 4000;
- }
+ mips_cpu = 4000;
else if (strcmp (p, "4400") == 0)
- {
- mips_isa = 3;
- mips_cpu = 4400;
- }
+ mips_cpu = 4400;
else if (strcmp (p, "4600") == 0)
- {
- mips_isa = 3;
- mips_cpu = 4600;
- }
+ mips_cpu = 4600;
break;
case '6':
if (strcmp (p, "6000") == 0
|| strcmp (p, "6k") == 0
|| strcmp (p, "6K") == 0)
- {
- mips_isa = 2;
- mips_cpu = 6000;
- }
+ mips_cpu = 6000;
break;
case 'o':
if (strcmp (p, "orion") == 0)
- {
- mips_isa = 3;
- mips_cpu = 4600;
- }
+ mips_cpu = 4600;
break;
}
- if (mips_isa == -1)
+ if (mips_cpu == -1)
{
as_bad ("invalid architecture -mcpu=%s", arg);
return 0;