+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.
/* 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.
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;
+
\f
void
print_version_id ()
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?? */
{
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;
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;