wrong and should only be used for dump related things, not
debugging information, instead main_input_filename should be used.
Also, reuse output_file_directive if possible.
* i386/aix386ng.h (ASM_FILE_START): Likewise.
* i386/isc.h (ASM_FILE_START): Likewise.
* i386/win-nt.h (ASM_FILE_START): Likewise.
* i386/sun386.h (ASM_FILE_START): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24174
138bc75d-0d04-0410-961f-
82ee72b054a4
+Tue Dec 8 00:34:05 1998 Mike Stump <mrs@wrs.com>
+
+ * i386/bsd.h (ASM_FILE_START): Don't use dump_base_name, it is
+ wrong and should only be used for dump related things, not
+ debugging information, instead main_input_filename should be used.
+ Also, reuse output_file_directive if possible.
+ * i386/aix386ng.h (ASM_FILE_START): Likewise.
+ * i386/isc.h (ASM_FILE_START): Likewise.
+ * i386/win-nt.h (ASM_FILE_START): Likewise.
+ * i386/sun386.h (ASM_FILE_START): Likewise.
+
Mon Dec 7 23:56:28 1998 Robert Lipe <robertl@dgii.com>
* configure.in (mips*-*-linux*): Handle big and little endian
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
- do { fprintf (FILE, "\t.file\t"); \
- output_quoted_string (FILE, dump_base_name); \
- fprintf (FILE, "\n"); \
+ do { output_file_directive (FILE, main_input_filename); \
if (optimize) \
ASM_FILE_START_1 (FILE); \
else \
??? I am skeptical of this -- RMS. */
#define ASM_FILE_START(FILE) \
- do { fprintf (FILE, "\t.file\t"); \
- output_quoted_string (FILE, dump_base_name); \
- fprintf (FILE, "\n"); \
+ do { output_file_directive (FILE, main_input_filename); \
} while (0)
/* This was suggested, but it shouldn't be right for DBX output. -- RMS
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
-/* Use the main_input_filename instead of dump_base_name */
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
message. */
#undef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
- do { \
- char c; \
- int max = 0; \
- char *string = dump_base_name; \
- \
- fputs ("\t.file\t\"", FILE); \
- \
- while ((c = *string++) != 0 && max++ < 14) { \
- if (c == '\"' || c == '\\') \
- putc ('\\', FILE); \
- putc (c, FILE); \
- } \
- fputs ("\"\n", FILE); \
+#define ASM_FILE_START(FILE) \
+ do { \
+ int len = strlen (main_input_filename); \
+ char *na = main_input_filename + len; \
+ char shorter[15]; \
+ /* NA gets MAIN_INPUT_FILENAME sans directory names. */\
+ while (na > main_input_filename) \
+ { \
+ if (na[-1] == '/') \
+ break; \
+ na--; \
+ } \
+ strncpy (shorter, na, 14); \
+ shorter[14] = 0; \
+ fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, shorter); \
+ fprintf (FILE, "\n"); \
} while (0)
/* Work around assembler forward label references generated in exception
do { \
extern char *version_string, *language_string; \
{ \
- int len = strlen (dump_base_name); \
- char *na = dump_base_name + len; \
+ int len = strlen (main_input_filename); \
+ char *na = main_input_filename + len; \
char shorter[15]; \
- /* NA gets DUMP_BASE_NAME sans directory names. */\
- while (na > dump_base_name) \
+ /* NA gets MAIN_INPUT_FILENAME sans directory names. */\
+ while (na > main_input_filename) \
{ \
if (na[-1] == '/') \
break; \
#undef ASM_FILE_START
#endif
#define ASM_FILE_START(FILE) \
- do { fprintf (FILE, "\t.file\t"); \
- output_quoted_string (FILE, dump_base_name); \
- fprintf (FILE, "\n"); \
+ do { output_file_directive (FILE, main_input_filename); \
fprintf (FILE, ".global\t__fltused\n"); \
} while (0)