This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS gas option confusion
Eric Christopher <echristo@redhat.com> writes:
> > Does anybody object to this course of action?
>
> Go for it.
I have checked in the following patch.
Ian
2004-01-08 Ian Lance Taylor <ian@wasabisystems.com>
* config/tc-mips.c (warn_nops): Remove static variable.
(macro): Remove test of warn_nops.
(md_shortops): Remove 'n'.
(md_parse_option): Remove 'n' case.
(md_show_usage): Remove -n.
* doc/as.texinfo (Overview): Remove MIPS -n option.
* doc/c-mips.texi (MIPS Opts): Remove mention -n.
* NEWS: Mention removal of MIPS -n option.
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gas/NEWS,v
retrieving revision 1.54
diff -p -u -r1.54 NEWS
--- NEWS 19 Dec 2003 11:43:38 -0000 1.54
+++ NEWS 9 Jan 2004 02:32:46 -0000
@@ -28,6 +28,9 @@
with multi-byte nop instructions such as leal 0(%esi,1),%esi. This
switch disables the optimization.
+* Removed -n option from MIPS assembler. It was not useful, and confused the
+ existing -non_shared option.
+
Changes in 2.14:
* Added support for MIPS32 Release 2.
Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.243
diff -p -u -r1.243 tc-mips.c
--- config/tc-mips.c 9 Jan 2004 02:16:30 -0000 1.243
+++ config/tc-mips.c 9 Jan 2004 02:32:50 -0000
@@ -379,9 +379,6 @@ static int mips_32bitmode = 0;
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 = 0;
@@ -4196,19 +4193,9 @@ macro (struct mips_cl_insn *ip)
do_false:
/* result is always false */
if (! likely)
- {
- if (warn_nops)
- as_warn (_("Branch %s is always false (nop)"),
- ip->insn_mo->name);
- macro_build (NULL, &icnt, NULL, "nop", "", 0);
- }
+ macro_build (NULL, &icnt, NULL, "nop", "", 0);
else
- {
- if (warn_nops)
- as_warn (_("Branch likely %s is always false"),
- ip->insn_mo->name);
- macro_build (NULL, &icnt, &offset_expr, "bnel", "s,t,p", 0, 0);
- }
+ macro_build (NULL, &icnt, &offset_expr, "bnel", "s,t,p", 0, 0);
return;
}
if (imm_expr.X_op != O_constant)
@@ -10428,7 +10415,7 @@ static int support_64bit_objects(void)
}
#endif /* OBJ_ELF */
-const char *md_shortopts = "nO::g::G:";
+const char *md_shortopts = "O::g::G:";
struct option md_longopts[] =
{
@@ -10613,10 +10600,6 @@ md_parse_option (int c, char *arg)
target_big_endian = 0;
break;
- case 'n':
- warn_nops = 1;
- break;
-
case 'O':
if (arg && arg[1] == '0')
mips_optimize = 1;
@@ -14705,7 +14688,6 @@ MIPS options:\n\
-mfp32 use 32-bit FPRs, regardless of the chosen ISA\n\
-O0 remove unneeded NOPs, do not swap branches\n\
-O remove unneeded NOPs and swap branches\n\
--n warn about NOPs generated from macros\n\
--[no-]construct-floats [dis]allow floating point values to be constructed\n\
--trap, --no-break trap exception on div by 0 and mult overflow\n\
--break, --no-trap break exception on div by 0 and mult overflow\n"));
Index: doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.95
diff -p -u -r1.95 as.texinfo
--- doc/as.texinfo 5 Jan 2004 22:19:33 -0000 1.95
+++ doc/as.texinfo 9 Jan 2004 02:32:52 -0000
@@ -1,6 +1,6 @@
\input texinfo @c -*-Texinfo-*-
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003
+@c 2001, 2002, 2003, 2004
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -350,7 +350,7 @@ gcc(1), ld(1), and the Info entries for
@ifset MIPS
@emph{Target MIPS options:}
- [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-n}] [@b{-O}[@var{optimization level}]]
+ [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-O}[@var{optimization level}]]
[@b{-g}[@var{debug level}]] [@b{-G} @var{num}] [@b{-KPIC}] [@b{-call_shared}]
[@b{-non_shared}] [@b{-xgot}] [@b{--membedded-pic}]
[@b{-mabi}=@var{ABI}] [@b{-32}] [@b{-n32}] [@b{-64}] [@b{-mfp32}] [@b{-mgp32}]
Index: doc/c-mips.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-mips.texi,v
retrieving revision 1.29
diff -p -u -r1.29 c-mips.texi
--- doc/c-mips.texi 30 Sep 2003 16:17:13 -0000 1.29
+++ doc/c-mips.texi 9 Jan 2004 02:32:52 -0000
@@ -1,4 +1,5 @@
-@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
+@c 2002, 2003, 2004
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -237,10 +238,6 @@ error is detected. This is the default.
@itemx -mno-pdr
Control generation of @code{.pdr} sections. Off by default on IRIX, on
elsewhere.
-
-@item -n
-When this option is used, @code{@value{AS}} will issue a warning every
-time it generates a nop instruction from a macro.
@end table
@node MIPS Object