This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Do away with LOSING_COMPILER


tc-mips.c has long had a LOSING_COMPILER macro that splits the huge
macro() function into two.  This was added to work around a bug in some
ancient compiler's handling of large switch statements.  (I remember
seeing a description, but it hardly seems worth dredging it up.)

The two-function version hasn't compiled for a while now, and I noticed
Maciej's (quite reasonable) patch would have introduced another cause.
It seems a shame to kill of such quaint code but, well, it's just a
maintenance burden now.

Tested on mips64-linux-gnu and applied.

Richard


gas/
	* config/tc-mips.c (macro2): Delete.

Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c	2010-10-25 21:31:22.000000000 +0100
+++ gas/config/tc-mips.c	2010-10-25 21:31:34.000000000 +0100
@@ -1072,9 +1072,6 @@ static void macro_start (void);
 static void macro_end (void);
 static void macro (struct mips_cl_insn * ip);
 static void mips16_macro (struct mips_cl_insn * ip);
-#ifdef LOSING_COMPILER
-static void macro2 (struct mips_cl_insn * ip);
-#endif
 static void mips_ip (char *str, struct mips_cl_insn * ip);
 static void mips16_ip (char *str, struct mips_cl_insn * ip);
 static void mips16_immed
@@ -7408,66 +7405,6 @@ macro (struct mips_cl_insn *ip)
       move_register (dreg, sreg);
       break;
 
-#ifdef LOSING_COMPILER
-    default:
-      /* Try and see if this is a new itbl instruction.
-         This code builds table entries out of the macros in mip_opcodes.
-         FIXME: For now we just assemble the expression and pass it's
-         value along as a 32-bit immediate.
-         We may want to have the assembler assemble this value,
-         so that we gain the assembler's knowledge of delay slots,
-         symbols, etc.
-         Would it be more efficient to use mask (id) here? */
-      if (itbl_have_entries
-	  && (immed_expr = itbl_assemble (ip->insn_mo->name, "")))
-	{
-	  s = ip->insn_mo->name;
-	  s2 = "cop3";
-	  coproc = ITBL_DECODE_PNUM (immed_expr);;
-	  macro_build (&immed_expr, s, "C");
-	  break;
-	}
-      macro2 (ip);
-      break;
-    }
-  if (!mips_opts.at && used_at)
-    as_bad (_("Macro used $at after \".set noat\""));
-}
-
-static void
-macro2 (struct mips_cl_insn *ip)
-{
-  unsigned int treg, sreg, dreg, breg;
-  unsigned int tempreg;
-  int mask;
-  int used_at;
-  expressionS expr1;
-  const char *s;
-  const char *s2;
-  const char *fmt;
-  int likely = 0;
-  int dbl = 0;
-  int coproc = 0;
-  int lr = 0;
-  int imm = 0;
-  int off;
-  offsetT maxnum;
-  bfd_reloc_code_real_type r;
-
-  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;
     case M_MUL:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]