aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-01-07 19:18:16 +0000
committerStan Shebs <shebs@codesourcery.com>1994-01-07 19:18:16 +0000
commit917fae09f9c1b9905a5fb14658d53af6831b76af (patch)
tree9bba41430668a272f3cf473ad82217b6a5a258e3
parentfbe3316aba384833c8b9de0288a0d07d593d7958 (diff)
downloadgdb-917fae09f9c1b9905a5fb14658d53af6831b76af.zip
gdb-917fae09f9c1b9905a5fb14658d53af6831b76af.tar.gz
gdb-917fae09f9c1b9905a5fb14658d53af6831b76af.tar.bz2
Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com)
* config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that splits the function. (macro2): New function, if LOSING_COMPILER defined.
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c45
2 files changed, 51 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 33fde72..f9dffaf 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that
+ splits the function.
+ (macro2): New function, if LOSING_COMPILER defined.
+
Fri Jan 7 09:38:25 1994 Steve Chamberlain (sac@cygnus.com)
* config/obj-coffbfd.c (fill_section): Don't ever fill past the
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 24805de..606fd57 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -289,6 +289,9 @@ static void check_absolute_expr PARAMS ((struct mips_cl_insn * ip,
static void load_register PARAMS ((int *counter, int reg, expressionS * ep));
static void load_address PARAMS ((int *counter, int reg, expressionS *ep));
static void macro PARAMS ((struct mips_cl_insn * ip));
+#ifdef LOSING_COMPILER
+static void macro2 PARAMS ((struct mips_cl_insn * ip));
+#endif
static void mips_ip PARAMS ((char *str, struct mips_cl_insn * ip));
static int my_getSmallExpression PARAMS ((expressionS * ep, char *str));
static void my_getExpression PARAMS ((expressionS * ep, char *str));
@@ -3111,6 +3114,48 @@ macro (ip)
macro_build ((char *) NULL, &icnt, &offset_expr, s, "t,o(b)", treg + 1,
(int) BFD_RELOC_LO16, breg);
return;
+#ifdef LOSING_COMPILER
+ default:
+ macro2 (ip);
+ return;
+ }
+ if (mips_noat)
+ as_warn ("Macro used $at after \".set noat\"");
+}
+
+static void
+macro2 (ip)
+ struct mips_cl_insn *ip;
+{
+ register int treg, sreg, dreg, breg;
+ int tempreg;
+ int mask;
+ int icnt = 0;
+ int used_at;
+ expressionS expr1;
+ const char *s;
+ const char *s2;
+ const char *fmt;
+ int likely = 0;
+ int dbl = 0;
+ int coproc = 0;
+ offsetT maxnum;
+ bfd_reloc_code_real_type r;
+ char *p;
+
+ treg = (ip->insn_opcode >> 16) & 0x1f;
+ dreg = (ip->insn_opcode >> 11) & 0x1f;
+ sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
+ mask = ip->insn_mo->mask;
+
+ expr1.X_op = O_constant;
+ expr1.X_op_symbol = NULL;
+ expr1.X_add_symbol = NULL;
+ expr1.X_add_number = 1;
+
+ switch (mask)
+ {
+#endif /* LOSING_COMPILER */
case M_DMUL:
dbl = 1;