aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-01-26 02:34:20 +0000
committerStan Shebs <shebs@codesourcery.com>1994-01-26 02:34:20 +0000
commitca7bd5579ab2183c865e3d26f45094fe933eda85 (patch)
tree1b883c153c013434c52b93a72092669a9a1d0b8f
parent9dcf805766d9959c97f0b3eb9b3130a87fa6c4c1 (diff)
downloadgdb-ca7bd5579ab2183c865e3d26f45094fe933eda85.zip
gdb-ca7bd5579ab2183c865e3d26f45094fe933eda85.tar.gz
gdb-ca7bd5579ab2183c865e3d26f45094fe933eda85.tar.bz2
Tue Jan 25 18:30:34 1994 Stan Shebs (shebs@andros.cygnus.com)
* as.c (quiet_flag): New flag. (main): If -noquiet given, display execution time and memory used.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/as.c32
2 files changed, 36 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 751a333..c7e60f2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jan 25 18:30:34 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * as.c (quiet_flag): New flag.
+ (main): If -noquiet given, display execution time and memory used.
+
Tue Jan 25 15:53:11 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* doc/{all.texi,as.texinfo}: Add documentation for HPPA port.
diff --git a/gas/as.c b/gas/as.c
index d38301c..cf34a67 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,5 +1,5 @@
/* as.c - GAS main program.
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1990, 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -72,6 +72,11 @@ char *myname; /* argv[0] */
segT reg_section, expr_section;
segT text_section, data_section, bss_section;
#endif
+
+/* This is true if the assembler should not produce any timing info. */
+
+static int quiet_flag = 1;
+
void
print_version_id ()
@@ -98,6 +103,7 @@ main (argc, argv)
char *arg; /* an arg to program */
char a; /* an arg flag (after -) */
int keep_it;
+ long start_time = get_run_time ();
#if 0 /* do we need any of this?? */
{
@@ -266,6 +272,18 @@ main (argc, argv)
arg = ""; /* Finished with this arg. */
break;
+ case 'n':
+ if (*arg && strcmp(arg, "oquiet") == 0)
+ quiet_flag = 0;
+ else if (*arg && strcmp(arg, "ocpp") == 0)
+ ;
+ else
+ {
+ as_warn ("Unknown option `-n%s' ignored", arg);
+ arg += strlen (arg);
+ break;
+ }
+
case 'R':
/* -R means put data into text segment */
flag_readonly_data_in_text = 1;
@@ -363,6 +381,18 @@ main (argc, argv)
md_end ();
#endif
+ if (!quiet_flag)
+ {
+ extern char **environ;
+ char *lim = (char *) sbrk (0);
+ long run_time = get_run_time () - start_time;
+
+ fprintf (stderr, "%s: total time in assembly: %d.%06d\n",
+ myname, run_time / 1000000, run_time % 1000000);
+ fprintf (stderr, "%s: data size %ld\n",
+ myname, (long) (lim - (char *) &environ));
+ }
+
if ((had_warnings () && flagseen['Z'])
|| had_errors () > 0)
return EXIT_FAILURE;