From: Eric Christopher Date: Mon, 22 Apr 2002 21:21:06 +0000 (+0000) Subject: 2002-04-22 Eric Christopher X-Git-Tag: binutils-2_13-branchpoint~1276 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80cc45a581bf087fc2c9b25461f423885243b874;p=platform%2Fupstream%2Fbinutils.git 2002-04-22 Eric Christopher * config/tc-mips.c: Add warning if macro instructions are expanded into a branch delay slot. --- 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 + + * config/tc-mips.c: Add warning if macro instructions are expanded + into a branch delay slot. + 2002-04-17 Geoffrey Keating * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line @@ -14,7 +19,7 @@ 2002-04-15 Tom Rix - * 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 @@ -65,7 +70,7 @@ Tue Apr 9 16:45:48 2002 J"orn Rennecke Tom Rix From Jeff Knaggs - * 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 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, _("\