diff options
author | Eric Christopher <echristo@gmail.com> | 2002-04-22 21:21:06 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2002-04-22 21:21:06 +0000 |
commit | 80cc45a581bf087fc2c9b25461f423885243b874 (patch) | |
tree | ea52b5f2032aee1b413ecd0736e1086254915d41 | |
parent | ff970196bd5561eb16b271a0947ea1919186c377 (diff) | |
download | gdb-80cc45a581bf087fc2c9b25461f423885243b874.zip gdb-80cc45a581bf087fc2c9b25461f423885243b874.tar.gz gdb-80cc45a581bf087fc2c9b25461f423885243b874.tar.bz2 |
2002-04-22 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c: Add warning if macro instructions are expanded
into a branch delay slot.
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 14 |
2 files changed, 20 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 278ea24..3d98f1c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-04-22 Eric Christopher <echristo@redhat.com> + + * config/tc-mips.c: Add warning if macro instructions are expanded + into a branch delay slot. + 2002-04-17 Geoffrey Keating <geoffk@redhat.com> * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line @@ -14,7 +19,7 @@ 2002-04-15 Tom Rix <trix@redhat.com> - * config/tc-d10v.c (d10v_fix_adjustable): Prevent adjustments to + * config/tc-d10v.c (d10v_fix_adjustable): Prevent adjustments to symbols in merge sections. 2002-04-11 Richard Sandiford <rsandifo@redhat.com> @@ -65,7 +70,7 @@ Tue Apr 9 16:45:48 2002 J"orn Rennecke <joern.rennecke@superh.com> Tom Rix <trix@redhat.com> From Jeff Knaggs <jknaggs@redhat.com> - * config/tc-d10v.c (check_resource_conflict): New function to + * config/tc-d10v.c (check_resource_conflict): New function to check for resource conflicts. From Jason Eckhardt <jle@redhat.com> diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 9296218..e2e6fbc 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -2881,6 +2881,18 @@ macro_build (place, counter, ep, name, fmt, va_alist) if (mips_opts.warn_about_macros && place == NULL && *counter == 1) as_warn (_("Macro instruction expanded into multiple instructions")); + /* + * If the macro is about to expand into a second instruction, + * and it is in a delay slot, print a warning. + */ + if (place == NULL + && *counter == 1 + && mips_opts.noreorder + && (prev_prev_insn.insn_mo->pinfo + & (INSN_UNCOND_BRANCH_DELAY | INSN_COND_BRANCH_DELAY + | INSN_COND_BRANCH_LIKELY) != 0) + as_warn (_("Macro instruction expanded into multiple instructions in a branch delay slot")); + if (place == NULL) *counter += 1; /* bump instruction counter */ @@ -10264,7 +10276,7 @@ MIPS options:\n\ show (stream, "n32", &column, &first); show (stream, "64", &column, &first); show (stream, "eabi", &column, &first); - + fputc ('\n', stream); fprintf (stream, _("\ |