]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/
authorRichard Sandiford <rdsandiford@googlemail.com>
Wed, 29 Jun 2011 20:46:10 +0000 (20:46 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Wed, 29 Jun 2011 20:46:10 +0000 (20:46 +0000)
* config/tc-mips.c (append_insn): Always clear the history after an
unconditional branch.

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

index 40f56222fd4e8c6c14afe1c7ff28fe4fd30d1f71..6e2efed18266bffae0727bb12f2ea05522cf0b49 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-29  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/tc-mips.c (append_insn): Always clear the history after an
+       unconditional branch.
+
 2011-06-29  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * config/tc-mips.c (find_altered_mips16_opcode): New function.
index d8da3d73800db3ef124b4d6b4d6c3162c4dae9fc..2c807939c59b173896683292cc6eeda8e17bb389 100644 (file)
@@ -3610,13 +3610,6 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
              delay.fixed_p = 1;
              insert_into_history (0, 1, &delay);
            }
-
-         /* If that was an unconditional branch, forget the previous
-            insn information.  */
-         if (pinfo & INSN_UNCOND_BRANCH_DELAY)
-           {
-             mips_no_prev_insn ();
-           }
        }
       else if (pinfo & INSN_COND_BRANCH_LIKELY)
        {
@@ -3633,6 +3626,12 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
   else
     insert_into_history (0, 1, ip);
 
+  /* If we have just completed an unconditional branch, clear the history.  */
+  if ((history[1].insn_mo->pinfo & INSN_UNCOND_BRANCH_DELAY)
+      || (mips_opts.mips16
+         && (history[0].insn_mo->pinfo & MIPS16_INSN_UNCOND_BRANCH)))
+    mips_no_prev_insn ();
+
   /* We just output an insn, so the next one doesn't have a label.  */
   mips_clear_insn_labels ();
 }