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 /gas/config | |
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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-mips.c | 14 |
1 files changed, 13 insertions, 1 deletions
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, _("\ |