* config/tc-mips.c (macro): Rework division code to avoid unfilled
authorJeff Law <law@redhat.com>
Thu, 15 Jan 1998 00:08:12 +0000 (00:08 +0000)
committerJeff Law <law@redhat.com>
Thu, 15 Jan 1998 00:08:12 +0000 (00:08 +0000)
        delay slot.

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

index 74194bdc112e07d7b7af047dedc4f3b1ccdb439e..b83f30e641e4fbaccc349e830ef7a4387a008408 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 15:41:41 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * config/tc-mips.c (macro): Rework division code to avoid unfilled
+       delay slot.
+
 start-sanitize-d30v
 Wed Jan 14 18:04:20 1998  Michael Meissner  <meissner@cygnus.com>
 
index e2bf296815821d83db59de65f0155e6399b74c4d..33d1a683310bd3bd30bd37f8794d5ce6dffbf84b 100644 (file)
@@ -3864,16 +3864,20 @@ macro (ip)
       mips_emit_delays (true);
       ++mips_opts.noreorder;
       mips_any_noreorder = 1;
-      macro_build ((char *) NULL, &icnt, NULL,
-                  dbl ? "ddiv" : "div",
-                  "z,s,t", sreg, treg);
       if (mips_trap)
-       macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
+       {
+         macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
+         macro_build ((char *) NULL, &icnt, NULL,
+                      dbl ? "ddiv" : "div",
+                      "z,s,t", sreg, treg);
+       }
       else
        {
          expr1.X_add_number = 8;
          macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0);
-         macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
+         macro_build ((char *) NULL, &icnt, NULL,
+                      dbl ? "ddiv" : "div",
+                      "z,s,t", sreg, treg);
          macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
        }
       expr1.X_add_number = -1;
@@ -4005,14 +4009,16 @@ macro (ip)
       mips_emit_delays (true);
       ++mips_opts.noreorder;
       mips_any_noreorder = 1;
-      macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg);
       if (mips_trap)
-       macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
+       {
+         macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
+         macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg);
+       }
       else
        {
          expr1.X_add_number = 8;
          macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0);
-         macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
+         macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg);
          macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
        }
       --mips_opts.noreorder;
This page took 0.040684 seconds and 4 git commands to generate.