aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1998-01-15 00:08:12 +0000
committerJeff Law <law@redhat.com>1998-01-15 00:08:12 +0000
commit6c4b811d6aa61afa9afa247eb480aec55b341108 (patch)
treefe043a18ac4a7de6ddef324e62c9710f39a76153
parent52dcb248fbabe9c9d2f7091ee9e9c6e205ce2b2a (diff)
downloadgdb-6c4b811d6aa61afa9afa247eb480aec55b341108.zip
gdb-6c4b811d6aa61afa9afa247eb480aec55b341108.tar.gz
gdb-6c4b811d6aa61afa9afa247eb480aec55b341108.tar.bz2
* config/tc-mips.c (macro): Rework division code to avoid unfilled delay slot.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c22
2 files changed, 19 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 74194bd..b83f30e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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>
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index e2bf296..33d1a68 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -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;