aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-06-09 05:24:39 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-06-09 05:24:39 +0000
commit39c0a33100862ba819871baddf47164c1db5e9bb (patch)
treeefea1c10a1cfc20a0021499153e9e4e3b2e20acf
parent268f6bed84d11426bfd97ad25d78b2afe7581b2a (diff)
downloadgdb-39c0a33100862ba819871baddf47164c1db5e9bb.zip
gdb-39c0a33100862ba819871baddf47164c1db5e9bb.tar.gz
gdb-39c0a33100862ba819871baddf47164c1db5e9bb.tar.bz2
2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (warn_nops): New variable. Set to 0 to disable warning about all NOPS that the assembler generates. (macro): Warn NOPS generated only if warn_nops is not 0. (md_shortopts): Add `n'. (md_parse_option): Set warn_nops to 1 for `n'.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-mips.c17
2 files changed, 22 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ae2cd9c..6e2ad00 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
2001-06-08 H.J. Lu <hjl@gnu.org>
+ * config/tc-mips.c (warn_nops): New variable. Set to 0 to
+ disable warning about all NOPS that the assembler generates.
+ (macro): Warn NOPS generated only if warn_nops is not 0.
+ (md_shortopts): Add `n'.
+ (md_parse_option): Set warn_nops to 1 for `n'.
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
* config/tc-mips.c (mips_ip): Properly handle illegal operands.
2001-06-08 H.J. Lu <hjl@gnu.org>
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index b61d01c..ea5fe48 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -313,6 +313,9 @@ enum mips_pic_level
static enum mips_pic_level mips_pic;
+/* Warn about all NOPS that the assembler generates. */
+static int warn_nops = 0;
+
/* 1 if we should generate 32 bit offsets from the GP register in
SVR4_PIC mode. Currently has no meaning in other modes. */
static int mips_big_got;
@@ -3626,12 +3629,16 @@ macro (ip)
/* result is always false */
if (! likely)
{
- as_warn (_("Branch %s is always false (nop)"), ip->insn_mo->name);
+ if (warn_nops)
+ as_warn (_("Branch %s is always false (nop)"),
+ ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
}
else
{
- as_warn (_("Branch likely %s is always false"), ip->insn_mo->name);
+ if (warn_nops)
+ as_warn (_("Branch likely %s is always false"),
+ ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, &offset_expr, "bnel",
"s,t,p", 0, 0);
}
@@ -8867,7 +8874,7 @@ md_number_to_chars (buf, val, n)
number_to_chars_littleendian (buf, val, n);
}
-CONST char *md_shortopts = "O::g::G:";
+CONST char *md_shortopts = "nO::g::G:";
struct option md_longopts[] =
{
@@ -8984,6 +8991,10 @@ md_parse_option (c, arg)
target_big_endian = 0;
break;
+ case 'n':
+ warn_nops = 1;
+ break;
+
case 'O':
if (arg && arg[1] == '0')
mips_optimize = 1;