aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-08-13 19:53:52 +0000
committerNick Clifton <nickc@redhat.com>2004-08-13 19:53:52 +0000
commitcaa32fe507720347f37e2d060d64a89d96928db1 (patch)
treeaa7df1d5f68e3c802562c84a7f3678e14c6b7616 /gas/as.c
parenta21de0dadf0ad4334afe22bc14ff1811b795190f (diff)
downloadgdb-caa32fe507720347f37e2d060d64a89d96928db1.zip
gdb-caa32fe507720347f37e2d060d64a89d96928db1.tar.gz
gdb-caa32fe507720347f37e2d060d64a89d96928db1.tar.bz2
Add and handle new --alternate command line option.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/gas/as.c b/gas/as.c
index 0911aa1..b328762 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -123,6 +123,8 @@ static struct itbl_file_list *itbl_files;
static long start_time;
+static int flag_macro_alternate;
+
#ifdef USE_EMULATIONS
#define EMULATION_ENVIRON "AS_EMULATION"
@@ -245,6 +247,8 @@ Options:\n\
=FILE list to FILE (must be last sub-option)\n"));
fprintf (stream, _("\
+ --alternate initially turn on alternate macro syntax\n"));
+ fprintf (stream, _("\
-D produce assembler debugging messages\n"));
fprintf (stream, _("\
--defsym SYM=VAL define symbol SYM to given value\n"));
@@ -414,6 +418,7 @@ parse_args (int * pargc, char *** pargv)
OPTION_TARGET_HELP,
OPTION_EXECSTACK,
OPTION_NOEXECSTACK,
+ OPTION_ALTERNATE,
OPTION_WARN_FATAL
};
@@ -457,6 +462,7 @@ parse_args (int * pargc, char *** pargv)
{"execstack", no_argument, NULL, OPTION_EXECSTACK},
{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK},
#endif
+ {"alternate", no_argument, NULL, OPTION_ALTERNATE},
{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
/* When you add options here, check that they do not collide with
OPTION_MD_BASE. See as.h. */
@@ -731,6 +737,19 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
flag_always_generate_output = 1;
break;
+ case OPTION_ALTERNATE:
+ optarg = old_argv [optind - 1];
+ while (* optarg == '-')
+ optarg ++;
+
+ if (strcmp (optarg, "alternate") == 0)
+ {
+ flag_macro_alternate = 1;
+ break;
+ }
+ optarg ++;
+ /* Fall through. */
+
case 'a':
if (optarg)
{
@@ -981,7 +1000,6 @@ perform_an_assembly_pass (int argc, char ** argv)
int
main (int argc, char ** argv)
{
- int macro_alternate;
int macro_strip_at;
int keep_it;
@@ -1036,7 +1054,6 @@ main (int argc, char ** argv)
if (flag_print_statistics)
xatexit (dump_statistics);
- macro_alternate = 0;
macro_strip_at = 0;
#ifdef TC_I960
macro_strip_at = flag_mri;
@@ -1044,11 +1061,11 @@ main (int argc, char ** argv)
#ifdef TC_A29K
/* For compatibility with the AMD 29K family macro assembler
specification. */
- macro_alternate = 1;
+ flag_macro_alternate = 1;
macro_strip_at = 1;
#endif
- macro_init (macro_alternate, flag_mri, macro_strip_at, macro_expr);
+ macro_init (flag_macro_alternate, flag_mri, macro_strip_at, macro_expr);
PROGRESS (1);