OSDN Git Service

* i386/bsd.h (ASM_FILE_START): Don't use dump_base_name, it is
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 1998 23:36:08 +0000 (23:36 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 1998 23:36:08 +0000 (23:36 +0000)
        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

gcc/ChangeLog
gcc/config/i386/aix386ng.h
gcc/config/i386/bsd.h
gcc/config/i386/go32.h
gcc/config/i386/isc.h
gcc/config/i386/sun386.h
gcc/config/i386/win-nt.h

index 15ada9a..a871069 100644 (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>
 
        * configure.in (mips*-*-linux*): Handle big and little endian
index a177b69..3b3d65a 100644 (file)
@@ -58,9 +58,7 @@ Boston, MA 02111-1307, USA.  */
 
 #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                                                    \
index d50be36..34db79a 100644 (file)
@@ -49,9 +49,7 @@ Boston, MA 02111-1307, USA.  */
    ??? 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
index c190f7f..ec585df 100644 (file)
@@ -74,7 +74,6 @@ dtor_section ()                                                       \
 
 /* 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)                                           \
index 5c39896..92d0b7e 100644 (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
index 4d4d66c..4302ec4 100644 (file)
@@ -59,11 +59,11 @@ do                                                          \
   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;                                      \
index 60c0bb6..97f10c3 100644 (file)
@@ -131,9 +131,7 @@ while (0)
 #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)