aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2000-02-22 14:43:54 +0000
committerAndrew Haley <aph@redhat.com>2000-02-22 14:43:54 +0000
commitc97ef257d39ad29192e3eeff003106762bbcec2d (patch)
tree25dfee9a7726071b362608abb4b88bcc08d38b73 /gas/config/tc-mips.c
parent8027df8989e109409e2661cd9d963f7416f7aba2 (diff)
downloadgdb-c97ef257d39ad29192e3eeff003106762bbcec2d.zip
gdb-c97ef257d39ad29192e3eeff003106762bbcec2d.tar.gz
gdb-c97ef257d39ad29192e3eeff003106762bbcec2d.tar.bz2
1999-12-30 Andrew Haley <aph@cygnus.com>
* config/tc-mips.c (mips_gp32): New variable. (macro_build) Use mips_gp32. (mips_ip): Ditto. (md_longopts): Add "-mgp32" and "-mgp64". (md_parse_option): Add OPTION_GP32 and OPTION_GP64.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index f5b4d4e..b8b8c46 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -203,6 +203,9 @@ static int mips_eabi64 = 0;
mips3 or greater, then mark the object file 32BITMODE. */
static int mips_32bitmode = 0;
+/* True if -mgp32 was passed. */
+static int mips_gp32 = 0;
+
/* Some ISA's have delay slots for instructions which read or write
from a coprocessor (eg. mips1-mips3); some don't (eg mips4).
Return true if instructions marked INSN_LOAD_COPROC_DELAY,
@@ -2498,7 +2501,8 @@ macro_build (place, counter, ep, name, fmt, va_alist)
{
if (strcmp (fmt, insn.insn_mo->args) == 0
&& insn.insn_mo->pinfo != INSN_MACRO
- && OPCODE_IS_MEMBER (insn.insn_mo, mips_opts.isa, mips_cpu)
+ && OPCODE_IS_MEMBER (insn.insn_mo, mips_opts.isa, mips_cpu,
+ mips_gp32)
&& (mips_cpu != 4650 || (insn.insn_mo->pinfo & FP_D) == 0))
break;
@@ -7048,7 +7052,7 @@ mips_ip (str, ip)
assert (strcmp (insn->name, str) == 0);
- if (OPCODE_IS_MEMBER (insn, mips_opts.isa, mips_cpu))
+ if (OPCODE_IS_MEMBER (insn, mips_opts.isa, mips_cpu, mips_gp32))
ok = true;
else
ok = false;
@@ -8860,6 +8864,11 @@ struct option md_longopts[] = {
{"64", no_argument, NULL, OPTION_64},
#endif
+#define OPTION_GP32 (OPTION_MD_BASE + 41)
+#define OPTION_GP64 (OPTION_MD_BASE + 42)
+ {"mgp32", no_argument, NULL, OPTION_GP32},
+ {"mgp64", no_argument, NULL, OPTION_GP64},
+
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof(md_longopts);
@@ -9160,6 +9169,27 @@ md_parse_option (c, arg)
}
break;
+ case OPTION_GP32:
+ mips_gp32 = 1;
+ mips_64 = 0;
+
+ /* We deliberately don't allow "-gp32" to set the MIPS_32BITMODE
+ flag in object files because to do so would make it
+ impossible to link with libraries compiled without "-gp32".
+ This is unnecessarily restrictive.
+
+ We could solve this problem by adding "-gp32" multilibs to
+ gcc, but to set this flag before gcc is built with such
+ multilibs will break too many systems. */
+
+/* mips_32bitmode = 1; */
+ break;
+
+ case OPTION_GP64:
+ mips_gp32 = 0;
+ mips_64 = 1;
+/* mips_32bitmode = 0; */
+ break;
case OPTION_MABI:
if (strcmp (arg,"32") == 0