OSDN Git Service

* a29k/unix.h (ASM_FILE_START): Const-ify.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / sun386.h
index 1240081..86d8d95 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Sun assembler syntax for the Intel 80386.
-   Copyright (C) 1988 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,11 +15,12 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 /* Include common aspects of all 386 Unix assemblers.  */
-#include "unx386.h"
+#include "i386/unix.h"
 
 #define TARGET_VERSION fprintf (stderr, " (80386, Sun syntax)");
 
@@ -32,21 +33,24 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* Assembler pseudos to introduce constants of various size.  */
 
-#define ASM_BYTE_OP "\t.byte"
-#define ASM_SHORT "\t.value"
-#define ASM_LONG "\t.long"
-#define ASM_DOUBLE "\t.double"
+#define ASM_BYTE_OP "\t.byte\t"
+#define ASM_SHORT "\t.value\t"
+#define ASM_LONG "\t.long\t"
+#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
+
 
 /* How to output an ASCII string constant.  */
 
 #define ASM_OUTPUT_ASCII(FILE, p, size) \
+do                                                             \
 { int i = 0;                                                   \
   while (i < (size))                                           \
-    { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n");               \
-                      fprintf ((FILE), "%s ", ASM_BYTE_OP); }  \
-      else fprintf ((FILE), ",");                                      \
+    { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n");       \
+                      fprintf ((FILE), "%s", ASM_BYTE_OP); }   \
+      else fprintf ((FILE), ",");                              \
       fprintf ((FILE), "0x%x", ((p)[i++] & 0377)) ;}           \
-      fprintf ((FILE), "\n"); }
+      fprintf ((FILE), "\n");                                  \
+} while (0)
 
 /* Output at beginning of assembler file.  */
 /* The .file command should always begin the output.  */
@@ -54,13 +58,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef ASM_FILE_START
 #define ASM_FILE_START(FILE) \
   do {                                                 \
-    extern char *version_string, *language_string;     \
     {                                                  \
-      int len = strlen (dump_base_name);               \
-      char *na = dump_base_name + len;                 \
+      const int len = strlen (main_input_filename);    \
+      const 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;                                      \
@@ -68,10 +71,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
        }                                               \
       strncpy (shorter, na, 14);                       \
       shorter[14] = 0;                                 \
-      fprintf (FILE, "\t.file\t\"%s\"\n", shorter);    \
+      fprintf (FILE, "\t.file\t");                     \
+      output_quoted_string (FILE, shorter);            \
+      fprintf (FILE, "\n");                            \
     }                                                  \
     fprintf (FILE, "\t.version\t\"%s %s\"\n",          \
-            language_string, version_string);          \
+            lang_hooks.name, version_string);          \
     if (optimize) ASM_FILE_START_1 (FILE);             \
   } while (0)
 
@@ -97,7 +102,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* Output before writable data.  */
 
-#undef DATA_SECTION_ASSM_OP
+#undef DATA_SECTION_ASM_OP
 #define DATA_SECTION_ASM_OP "\t.data"
 
 /* Define the syntax of labels and symbol definitions/declarations.  */
@@ -124,12 +129,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
    This is suitable for output with `assemble_name'.  */
 
 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
-  sprintf ((BUF), ".%s%d", (PREFIX), (NUMBER))
+  sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
 
-/* This is how to output a reference to a user-level label named NAME.  */
+/* The prefix to add to user-visible assembler symbols.  */
 
-#define ASM_OUTPUT_LABELREF(FILE,NAME) \
-  fprintf (FILE, "%s", NAME)
+#define USER_LABEL_PREFIX ""
 
 /* This is how to output an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */