2002-04-22 Eric Christopher <echristo@redhat.com>

* config/tc-mips.c: Add warning if macro instructions are expanded
	into a branch delay slot.
This commit is contained in:
Eric Christopher 2002-04-22 21:21:06 +00:00
parent ff970196bd
commit 80cc45a581
2 changed files with 20 additions and 3 deletions

View file

@ -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> 2002-04-17 Geoffrey Keating <geoffk@redhat.com>
* dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line

View file

@ -2881,6 +2881,18 @@ macro_build (place, counter, ep, name, fmt, va_alist)
if (mips_opts.warn_about_macros && place == NULL && *counter == 1) if (mips_opts.warn_about_macros && place == NULL && *counter == 1)
as_warn (_("Macro instruction expanded into multiple instructions")); 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) if (place == NULL)
*counter += 1; /* bump instruction counter */ *counter += 1; /* bump instruction counter */