bsd.h (ASM_FILE_START): Don't use dump_base_name...

* 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.

From-SVN: r24174
This commit is contained in:
Mike Stump 1998-12-07 23:36:08 +00:00 committed by Jeff Law
parent 63684e6319
commit 872936ad0b
7 changed files with 35 additions and 28 deletions

View File

@ -1,3 +1,14 @@
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> Mon Dec 7 23:56:28 1998 Robert Lipe <robertl@dgii.com>
* configure.in (mips*-*-linux*): Handle big and little endian * configure.in (mips*-*-linux*): Handle big and little endian

View File

@ -58,9 +58,7 @@ Boston, MA 02111-1307, USA. */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
do { fprintf (FILE, "\t.file\t"); \ do { output_file_directive (FILE, main_input_filename); \
output_quoted_string (FILE, dump_base_name); \
fprintf (FILE, "\n"); \
if (optimize) \ if (optimize) \
ASM_FILE_START_1 (FILE); \ ASM_FILE_START_1 (FILE); \
else \ else \

View File

@ -49,9 +49,7 @@ Boston, MA 02111-1307, USA. */
??? I am skeptical of this -- RMS. */ ??? I am skeptical of this -- RMS. */
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
do { fprintf (FILE, "\t.file\t"); \ do { output_file_directive (FILE, main_input_filename); \
output_quoted_string (FILE, dump_base_name); \
fprintf (FILE, "\n"); \
} while (0) } while (0)
/* This was suggested, but it shouldn't be right for DBX output. -- RMS /* This was suggested, but it shouldn't be right for DBX output. -- RMS

View File

@ -74,7 +74,6 @@ dtor_section () \
/* Output at beginning of assembler file. */ /* Output at beginning of assembler file. */
/* The .file command should always begin the output. */ /* The .file command should always begin the output. */
/* Use the main_input_filename instead of dump_base_name */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \

View File

@ -72,20 +72,23 @@
message. */ message. */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
do { \ do { \
char c; \ int len = strlen (main_input_filename); \
int max = 0; \ char *na = main_input_filename + len; \
char *string = dump_base_name; \ char shorter[15]; \
\ /* NA gets MAIN_INPUT_FILENAME sans directory names. */\
fputs ("\t.file\t\"", FILE); \ while (na > main_input_filename) \
\ { \
while ((c = *string++) != 0 && max++ < 14) { \ if (na[-1] == '/') \
if (c == '\"' || c == '\\') \ break; \
putc ('\\', FILE); \ na--; \
putc (c, FILE); \ } \
} \ strncpy (shorter, na, 14); \
fputs ("\"\n", FILE); \ shorter[14] = 0; \
fprintf (FILE, "\t.file\t"); \
output_quoted_string (FILE, shorter); \
fprintf (FILE, "\n"); \
} while (0) } while (0)
/* Work around assembler forward label references generated in exception /* Work around assembler forward label references generated in exception

View File

@ -59,11 +59,11 @@ do \
do { \ do { \
extern char *version_string, *language_string; \ extern char *version_string, *language_string; \
{ \ { \
int len = strlen (dump_base_name); \ int len = strlen (main_input_filename); \
char *na = dump_base_name + len; \ char *na = main_input_filename + len; \
char shorter[15]; \ char shorter[15]; \
/* NA gets DUMP_BASE_NAME sans directory names. */\ /* NA gets MAIN_INPUT_FILENAME sans directory names. */\
while (na > dump_base_name) \ while (na > main_input_filename) \
{ \ { \
if (na[-1] == '/') \ if (na[-1] == '/') \
break; \ break; \

View File

@ -131,9 +131,7 @@ while (0)
#undef ASM_FILE_START #undef ASM_FILE_START
#endif #endif
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
do { fprintf (FILE, "\t.file\t"); \ do { output_file_directive (FILE, main_input_filename); \
output_quoted_string (FILE, dump_base_name); \
fprintf (FILE, "\n"); \
fprintf (FILE, ".global\t__fltused\n"); \ fprintf (FILE, ".global\t__fltused\n"); \
} while (0) } while (0)