8sa1-gcc/gcc/config/i386/dgux.c
Zack Weinberg acb0db7b38 toplev.c (output_lang_identify): Delete.
* toplev.c (output_lang_identify): Delete.
	(compile_file): Don't call ASM_IDENTIFY_GCC or ASM_IDENTIFY_LANGUAGE.
	Don't generate gcc2_compiled. label.  Don't emit a nop if profiling.
	If IDENT_ASM_OP is defined, emit an .ident "GCC (GNU) <version>"
	after calling ASM_FILE_END.

	* dbxout.c (dbxout_init): Don't call ASM_IDENTIFY_GCC_AFTER_SOURCE.
	Instead, unconditionally emit an N_OPT stab with string equal
	to STABS_GCC_MARKER, which defaults to "gcc2_compiled."

	* defaults.h: Don't provide default for ASM_IDENTIFY_LANGUAGE.

	* config/dbxelf.h, config/freebsd.h, config/nextstep.h,
	config/psos.h, config/ptx4.h, config/1750a/1750a.h,
	config/alpha/alpha.h, config/alpha/elf.h, config/arc/arc.h,
	config/arm/aof.h, config/arm/coff.h, config/arm/elf.h,
	config/arm/linux-elf.h, config/avr/avr.h, config/d30v/d30v.h,
	config/dsp16xx/dsp16xx.h, config/h8300/h8300.h,
	config/i370/i370.h, config/i386/beos-elf.h,
	config/i386/osf1elf.h, config/i386/osfrose.h,
	config/ia64/sysv4.h, config/m68k/3b1.h, config/m68k/auxgas.h,
	config/m68k/crds.h, config/m68k/hp320.h, config/m68k/m68kv4.h,
	config/m68k/mot3300.h, config/m68k/news.h, config/m68k/sgs.h,
	config/m68k/tower-as.h, config/mcore/mcore-elf.h,
	config/mips/iris6.h, config/mips/osfrose.h,
	config/mips/sni-svr4.h, config/pa/som.h, config/pdp11/pdp11.h,
	config/sparc/sp64-elf.h:
	Delete definitions of any or all of: ASM_IDENTIFY_GCC,
	ASM_IDENTIFY_GCC_AFTER_SOURCE, and ASM_IDENTIFY_LANGUAGE.

	* config/elfos.h, config/freebsd.h, config/linux.h,
	config/alpha/elf.h, config/arm/linux-elf.h, config/i386/i386elf.h,
	config/i386/ptx4-i.h, config/mips/gnu.h, config/mips/linux.h,
	config/sparc/linux.h, config/sparc/linux64.h: Delete definitions
	of ASM_FILE_START which merely emit a .version directive.  Delete
	definitions of ASM_FILE_END which merely emit an .ident directive.

	* config/avr/avr.h, config/vax/vax.h: Delete definition of
	ASM_IDENTIFY_GCC and move part of its logic into
	ASM_FILE_START.

	* config/i386/att.h, config/i386/gas.h, config/i386/linux.h,
	config/sparc/linux-aout.h: Don't emit .version directive in
	ASM_FILE_START.

	* config/i386/dgux.c, config/m88k/m88k.c, config/sh/sh.c
	(output_file_start): Correct comment.

	* config/i386/osfrose.h: Don't emit trailing .ident directive.
	* config/m68k/mot3300.h: Override STABS_GCC_MARKER to "gcc2_compiled%"
	to match gdb.
	* config/pa/lib2funcs.asm: Delete gcc_compiled. label.
	* config/rs6000/aix.h: Correct comment.

	* config/i386/i386afe.h: Delete.
	* config.gcc: Remove references to i386afe.h.

	* tm.texi: Delete documentation of ASM_IDENTIFY_GCC.  The
	other macros deleted by this patch were undocumented.

From-SVN: r41385
2001-04-16 18:30:48 +00:00

199 lines
5.6 KiB
C

/* Subroutines for GNU compiler for Intel 80x86 running DG/ux
Copyright (C) 1993, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
Currently maintained by (gcc@dg-rtp.dg.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <time.h>
#include "i386/i386.c"
struct lang_independent_option
{
char *string;
int *variable;
int on_value;
char *description;
};
static int
output_option (file, sep, type, name, indent, pos, max)
FILE *file;
char *sep;
char *type;
char *name;
char *indent;
int pos;
int max;
{
if (strlen (sep) + strlen (type) + strlen (name) + pos > max)
{
fprintf (file, indent);
return fprintf (file, "%s%s", type, name);
}
return pos + fprintf (file, "%s%s%s", sep, type, name);
}
static struct {
char *name;
int value;
const char * description;
} m_options[] = TARGET_SWITCHES;
static void
output_options (file, f_options, f_len, W_options, W_len,
pos, max, sep, indent, term)
FILE *file;
struct lang_independent_option *f_options;
struct lang_independent_option *W_options;
int f_len, W_len;
int pos;
int max;
int sep;
char *indent;
char *term;
{
register int j;
if (optimize)
pos = output_option (file, sep, "-O", "", indent, pos, max);
if (write_symbols != NO_DEBUG)
pos = output_option (file, sep, "-g", "", indent, pos, max);
/* if (flag_traditional)
pos = output_option (file, sep, "-traditional", "", indent, pos, max);*/
if (profile_flag)
pos = output_option (file, sep, "-p", "", indent, pos, max);
if (profile_block_flag)
pos = output_option (file, sep, "-a", "", indent, pos, max);
for (j = 0; j < f_len; j++)
if (*f_options[j].variable == f_options[j].on_value)
pos = output_option (file, sep, "-f", f_options[j].string,
indent, pos, max);
for (j = 0; j < W_len; j++)
if (*W_options[j].variable == W_options[j].on_value)
pos = output_option (file, sep, "-W", W_options[j].string,
indent, pos, max);
for (j = 0; j < ARRAY_SIZE (m_options); j++)
if (m_options[j].name[0] != '\0'
&& m_options[j].value > 0
&& ((m_options[j].value & target_flags)
== m_options[j].value))
pos = output_option (file, sep, "-m", m_options[j].name,
indent, pos, max);
if (ix86_cpu_string)
pos = output_option (file, sep, "-mcpu=", ix86_cpu_string,
indent, pos, max);
if (ix86_arch_string)
pos = output_option (file, sep, "-march=", ix86_arch_string,
indent, pos, max);
fprintf (file, term);
}
/* Output to FILE the start of the assembler file. */
void
output_file_start (file, f_options, f_len, W_options, W_len)
FILE *file;
struct lang_independent_option *f_options;
struct lang_independent_option *W_options;
int f_len, W_len;
{
register int pos;
output_file_directive (file, main_input_filename);
fprintf (file, "\t.version\t\"01.01\"\n"); \
/* Switch to the data section so that the coffsem symbol
isn't in the text section. */
data_section ();
pos = fprintf (file, "\n// cc1 (%s) arguments:", VERSION_STRING);
output_options (file, f_options, f_len, W_options, W_len,
pos, 75, " ", "\n// ", "\n\n");
#ifdef TARGET_IDENTIFY_REVISION
if (TARGET_IDENTIFY_REVISION)
{
char indent[256];
time_t now = time ((time_t *)0);
sprintf (indent, "]\"\n%s\"@(#)%s [", IDENT_ASM_OP, main_input_filename);
fprintf (file, indent+3);
pos = fprintf (file, "gcc %s, %.24s,", VERSION_STRING, ctime (&now));
output_options (file, f_options, f_len, W_options, W_len,
pos, 150 - strlen (indent), " ", indent, "]\"\n\n");
}
#endif /* TARGET_IDENTIFY_REVISION */
}
#ifndef CROSS_COMPILE
#if defined (_abort_aux)
/* Debugging aid to be registered via `atexit'. See the definition
of abort in dgux.h. */
void
abort_aux ()
{
extern int insn_;
extern char * file_;
extern int line_;
static int done;
rtx line_note;
if (done++)
return;
if (file_ || line_)
{
if (write_symbols != NO_DEBUG)
{
for (line_note = (rtx) insn_ ; line_note != 0 ; line_note = PREV_INSN (line_note))
if (GET_CODE (line_note) == NOTE && NOTE_LINE_NUMBER (line_note) > 0)
break;
if (line_note != 0)
{
error_with_file_and_line (NOTE_SOURCE_FILE (line_note),
NOTE_LINE_NUMBER (line_note),
"Internal gcc abort from %s:%d",
file_ ? file_ : "<nofile>", line_);
if (insn_ && file_ && strcmp (file_, "toplev.c"))
{
error_with_file_and_line (NOTE_SOURCE_FILE (line_note),
NOTE_LINE_NUMBER (line_note),
"The local variable `insn' has the value:", 0);
debug_rtx ((rtx) insn_);
}
}
}
if (write_symbols == NO_DEBUG || line_note == 0)
{
error ("Internal gcc abort from %s:%d",
file_ ? file_ : "<nofile>", line_);
if (insn_ && file_ && strcmp (file_, "toplev.c"))
{
error ("The local variable `insn' has the value:", 0);
debug_rtx ((rtx) insn_);
}
}
}
}
#endif
#endif