1 /* Subroutines for GNU compiler for Intel 80x86 running DG/ux
2 Copyright (C) 1993, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
3 Currently maintained by (gcc@dg-rtp.dg.com)
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
23 #include "i386/i386.c"
25 struct lang_independent_option
34 output_option (file, sep, type, name, indent, pos, max)
43 if (strlen (sep) + strlen (type) + strlen (name) + pos > max)
45 fprintf (file, indent);
46 return fprintf (file, "%s%s", type, name);
48 return pos + fprintf (file, "%s%s%s", sep, type, name);
54 const char * description;
55 } m_options[] = TARGET_SWITCHES;
58 output_options (file, f_options, f_len, W_options, W_len,
59 pos, max, sep, indent, term)
61 struct lang_independent_option *f_options;
62 struct lang_independent_option *W_options;
73 pos = output_option (file, sep, "-O", "", indent, pos, max);
74 if (write_symbols != NO_DEBUG)
75 pos = output_option (file, sep, "-g", "", indent, pos, max);
76 /* if (flag_traditional)
77 pos = output_option (file, sep, "-traditional", "", indent, pos, max);*/
79 pos = output_option (file, sep, "-p", "", indent, pos, max);
80 if (profile_block_flag)
81 pos = output_option (file, sep, "-a", "", indent, pos, max);
83 for (j = 0; j < f_len; j++)
84 if (*f_options[j].variable == f_options[j].on_value)
85 pos = output_option (file, sep, "-f", f_options[j].string,
88 for (j = 0; j < W_len; j++)
89 if (*W_options[j].variable == W_options[j].on_value)
90 pos = output_option (file, sep, "-W", W_options[j].string,
93 for (j = 0; j < ARRAY_SIZE (m_options); j++)
94 if (m_options[j].name[0] != '\0'
95 && m_options[j].value > 0
96 && ((m_options[j].value & target_flags)
97 == m_options[j].value))
98 pos = output_option (file, sep, "-m", m_options[j].name,
102 pos = output_option (file, sep, "-mcpu=", ix86_cpu_string,
104 if (ix86_arch_string)
105 pos = output_option (file, sep, "-march=", ix86_arch_string,
107 fprintf (file, term);
110 /* Output to FILE the start of the assembler file. */
113 output_file_start (file, f_options, f_len, W_options, W_len)
115 struct lang_independent_option *f_options;
116 struct lang_independent_option *W_options;
121 output_file_directive (file, main_input_filename);
122 fprintf (file, "\t.version\t\"01.01\"\n"); \
123 /* Switch to the data section so that the coffsem symbol
124 isn't in the text section. */
127 pos = fprintf (file, "\n// cc1 (%s) arguments:", VERSION_STRING);
128 output_options (file, f_options, f_len, W_options, W_len,
129 pos, 75, " ", "\n// ", "\n\n");
131 #ifdef TARGET_IDENTIFY_REVISION
132 if (TARGET_IDENTIFY_REVISION)
136 time_t now = time ((time_t *)0);
137 sprintf (indent, "]\"\n%s\"@(#)%s [", IDENT_ASM_OP, main_input_filename);
138 fprintf (file, indent+3);
139 pos = fprintf (file, "gcc %s, %.24s,", VERSION_STRING, ctime (&now));
140 output_options (file, f_options, f_len, W_options, W_len,
141 pos, 150 - strlen (indent), " ", indent, "]\"\n\n");
143 #endif /* TARGET_IDENTIFY_REVISION */
146 #ifndef CROSS_COMPILE
147 #if defined (_abort_aux)
148 /* Debugging aid to be registered via `atexit'. See the definition
149 of abort in dgux.h. */
163 if (write_symbols != NO_DEBUG)
165 for (line_note = (rtx) insn_ ; line_note != 0 ; line_note = PREV_INSN (line_note))
166 if (GET_CODE (line_note) == NOTE && NOTE_LINE_NUMBER (line_note) > 0)
170 error_with_file_and_line (NOTE_SOURCE_FILE (line_note),
171 NOTE_LINE_NUMBER (line_note),
172 "Internal gcc abort from %s:%d",
173 file_ ? file_ : "<nofile>", line_);
174 if (insn_ && file_ && strcmp (file_, "toplev.c"))
176 error_with_file_and_line (NOTE_SOURCE_FILE (line_note),
177 NOTE_LINE_NUMBER (line_note),
178 "The local variable `insn' has the value:", 0);
179 debug_rtx ((rtx) insn_);
183 if (write_symbols == NO_DEBUG || line_note == 0)
185 error ("Internal gcc abort from %s:%d",
186 file_ ? file_ : "<nofile>", line_);
187 if (insn_ && file_ && strcmp (file_, "toplev.c"))
189 error ("The local variable `insn' has the value:", 0);
190 debug_rtx ((rtx) insn_);