* config/tc-mips.c (append_insn): Remove useless code which
authorIan Lance Taylor <ian@airs.com>
Thu, 13 Feb 1997 01:29:39 +0000 (01:29 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 13 Feb 1997 01:29:39 +0000 (01:29 +0000)
handled swapping a mips16 jump with a mips16 instruction with a
reloc.

gas/ChangeLog
gas/config/tc-mips.c

index 679bacd71378f42a6ac10a81ef5d2e7c9fa69cff..5e0c67392fe86223ce9f1a4bab876f65ee6053e3 100644 (file)
@@ -1,5 +1,9 @@
 Wed Feb 12 14:36:29 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * config/tc-mips.c (append_insn): Remove useless code which
+       handled swapping a mips16 jump with a mips16 instruction with a
+       reloc.
+
        * config/tc-mips.c (md_parse_option): When debugging, set
        mips_optimize to 1, not 0.
 
index 2453714a78e0e80cde09a1f8f8536969506cb273..098144e508e499f73bad1f0b7f776fc64fc9a670 100644 (file)
@@ -1880,25 +1880,6 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
                      fixp->fx_where = prev_insn_where;
                    }
                }
-             else if (reloc_type > BFD_RELOC_UNUSED)
-               {
-                 char *prev_f;
-                 char temp[2];
-
-                 /* We are in mips16 mode, and we have just created a
-                     variant frag.  We need to extract the old
-                     instruction from the end of the previous frag,
-                     and add it to a new frag.  */
-                 prev_f = prev_insn_frag->fr_literal + prev_insn_where;
-                 memcpy (temp, prev_f, 2);
-                 prev_insn_frag->fr_fix -= 2;
-                 if (prev_insn_frag->fr_type == rs_machine_dependent)
-                   {
-                     assert (prev_insn_where == prev_insn_frag->fr_fix);
-                     memcpy (prev_f, prev_f + 2, 2);
-                   }
-                 memcpy (frag_more (2), temp, 2);
-               }
              else
                {
                  char *prev_f;
@@ -1909,7 +1890,10 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
                  memcpy (temp, prev_f, 2);
                  memcpy (prev_f, f, 2);
                  if (reloc_type != BFD_RELOC_MIPS16_JMP)
-                   memcpy (f, temp, 2);
+                   {
+                     assert (reloc_type == BFD_RELOC_UNUSED);
+                     memcpy (f, temp, 2);
+                   }
                  else
                    {
                      memcpy (f, f + 2, 2);