aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-02-12 20:20:11 +0000
committerIan Lance Taylor <ian@airs.com>1997-02-12 20:20:11 +0000
commit035936da058aee94f16cd82b6a433bddd9678118 (patch)
treebbb18364f6b9ac4a43da8736ab7022545b75e09c /gas
parented3eb78691406929f68285b0e8dc392e81bf8145 (diff)
downloadgdb-035936da058aee94f16cd82b6a433bddd9678118.zip
gdb-035936da058aee94f16cd82b6a433bddd9678118.tar.gz
gdb-035936da058aee94f16cd82b6a433bddd9678118.tar.bz2
* config/tc-mips.c (append_insn): Warn about an attempt to put an
extended instruction in a delay slot when not reordering. Set prev_insn_valid even if not reordering. (md_convert_frag): Warn if an extended instruction appears in a delay slot.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c17
2 files changed, 22 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0afe16e..2e3978d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (append_insn): Warn about an attempt to put an
+ extended instruction in a delay slot when not reordering. Set
+ prev_insn_valid even if not reordering.
+ (md_convert_frag): Warn if an extended instruction appears in a
+ delay slot.
+
* config/tc-mips.c (mips_pseudo_table): Add "insn".
(s_insn): New static function.
* doc/c-mips.texi: Document .insn.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 6830198..04be71e 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -1493,7 +1493,15 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
f = frag_more (2);
}
else
- f = frag_more (4);
+ {
+ if (mips16
+ && mips_noreorder
+ && (prev_pinfo & INSN_UNCOND_BRANCH_DELAY) != 0)
+ as_warn ("extended instruction in delay slot");
+
+ f = frag_more (4);
+ }
+
fixp = NULL;
if (address_expr != NULL && reloc_type < BFD_RELOC_UNUSED)
{
@@ -1980,6 +1988,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
PC relative relocs. */
prev_insn = *ip;
prev_insn_reloc_type = reloc_type;
+ prev_insn_valid = 1;
}
/* We just output an insn, so the next one doesn't have a label. */
@@ -9969,6 +9978,12 @@ md_convert_frag (abfd, asec, fragp)
record_alignment (asec, op->shift);
}
+ if (ext
+ && (RELAX_MIPS16_JAL_DSLOT (fragp->fr_subtype)
+ || RELAX_MIPS16_DSLOT (fragp->fr_subtype)))
+ as_warn_where (fragp->fr_file, fragp->fr_line,
+ "extended instruction in delay slot");
+
buf = (bfd_byte *) (fragp->fr_literal + fragp->fr_fix);
if (target_big_endian)