osf.h: Standarize copyright statement.
[gcc.git] / gcc / config / arm / coff.h
index 6db0c1afd06398d99099663bb07acf56a952ed45..6884029b5c45d44d4e1d66169dc08e17b5b63dec 100644 (file)
@@ -1,7 +1,8 @@
-/* Definitions of target machine for GNU compiler,
-   for ARM with COFF obj format.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-   Contributed by Doug Evans (dje@cygnus.com).
+/* Definitions of target machine for GNU compiler.
+   For ARM with COFF object format.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
+   Contributed by Doug Evans (devans@cygnus.com).
    
 This file is part of GNU CC.
 
@@ -20,33 +21,31 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#include "arm/semi.h"
-#include "arm/aout.h"
+#include "semi.h"
+#include "aout.h"
+
+/* Note - it is important that this definition matches the one in tcoff.h */
+#undef  USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX "_"
+
 \f
 /* Run-time Target Specification.  */
 #undef  TARGET_VERSION
 #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
 
 #undef  TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
+#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME)
 
-#define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32" }
-\f
-/* Setting this to 32 produces more efficient code, but the value set in previous
-   versions of this toolchain was 8, which produces more compact structures. The
-   command line option -mstructure_size_boundary=<n> can be used to change this
-   value.  */
-#undef  STRUCTURE_SIZE_BOUNDARY
-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
-
-extern int arm_structure_size_boundary;
+#ifndef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS \
+  { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
+#endif
 \f
 /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
    is a valid machine specific attribute for DECL.
    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
-extern int arm_valid_machine_decl_attribute ();
 #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
-arm_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
+  arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
 \f
 /* This is COFF, but prefer stabs.  */
 #define SDB_DEBUGGING_INFO
@@ -64,31 +63,35 @@ arm_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
    ordinary symbol, or gdb won't see it.  The stabs entry must be
    before the N_SO in order for gdb to find it.  */
 #define ASM_IDENTIFY_GCC(STREAM)                               \
-     fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
+  fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
 
 /* This outputs a lot of .req's to define alias for various registers.
    Let's try to avoid this.  */
 #undef ASM_FILE_START
-#define ASM_FILE_START(STREAM) \
-do {                                                           \
-  extern char *version_string;                                 \
-  fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n",    \
-          ASM_COMMENT_START, version_string);                  \
-} while (0)
-
-/* A C statement to output something to the assembler file to switch to section
-   NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
+#define ASM_FILE_START(STREAM)                                 \
+  do                                                           \
+    {                                                          \
+      fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n",        \
+              ASM_COMMENT_START, version_string);              \
+      fprintf (STREAM, ASM_APP_OFF);                           \
+    }                                                          \
+  while (0)
+
+/* A C statement to output something to the assembler file to switch to
+   section NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
    NULL_TREE.  Some target formats do not support arbitrary sections.  Do not
    define this macro in such cases.  */
-#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
-do {                                                           \
-  if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL)             \
-    fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME));         \
-  else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC))      \
-    fprintf (STREAM, "\t.section %s,\"\"\n", (NAME));          \
-  else                                                         \
-    fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME));         \
-} while (0)
+#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC)     \
+  do                                                           \
+    {                                                          \
+      if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL)         \
+        fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME));     \
+      else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC))  \
+        fprintf (STREAM, "\t.section %s,\"\"\n", (NAME));      \
+      else                                                     \
+        fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME));     \
+    }                                                          \
+  while (0)
 \f
 /* Support the ctors/dtors and other sections.  */
 
@@ -128,63 +131,67 @@ do {                                                              \
 #define SUBTARGET_EXTRA_SECTION_FUNCTIONS
 
 #define RDATA_SECTION_FUNCTION \
-void                                                                   \
-rdata_section ()                                                       \
-{                                                                      \
-  if (in_section != in_rdata)                                          \
-    {                                                                  \
-      fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP);            \
-      in_section = in_rdata;                                           \
-    }                                                                  \
+void                                                           \
+rdata_section ()                                               \
+{                                                              \
+  if (in_section != in_rdata)                                  \
+    {                                                          \
+      fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP);    \
+      in_section = in_rdata;                                   \
+    }                                                          \
 }
 
 #define CTORS_SECTION_FUNCTION \
-void                                                                   \
-ctors_section ()                                                       \
-{                                                                      \
-  if (in_section != in_ctors)                                          \
-    {                                                                  \
-      fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);            \
-      in_section = in_ctors;                                           \
-    }                                                                  \
+void                                                           \
+ctors_section ()                                               \
+{                                                              \
+  if (in_section != in_ctors)                                  \
+    {                                                          \
+      fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);    \
+      in_section = in_ctors;                                   \
+    }                                                          \
 }
 
 #define DTORS_SECTION_FUNCTION \
-void                                                                   \
-dtors_section ()                                                       \
-{                                                                      \
-  if (in_section != in_dtors)                                          \
-    {                                                                  \
-      fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);            \
-      in_section = in_dtors;                                           \
-    }                                                                  \
+void                                                           \
+dtors_section ()                                               \
+{                                                              \
+  if (in_section != in_dtors)                                  \
+    {                                                          \
+      fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);    \
+      in_section = in_dtors;                                   \
+    }                                                          \
 }
 \f
 /* Support the ctors/dtors sections for g++.  */
 
-#define INT_ASM_OP ".word"
+#define INT_ASM_OP "\t.word\t"
 
 /* A C statement (sans semicolon) to output an element in the table of
    global constructors.  */
 #undef ASM_OUTPUT_CONSTRUCTOR
-#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
-do {                                           \
-  ctors_section ();                            \
-  fprintf (STREAM, "\t%s\t ", INT_ASM_OP);     \
-  assemble_name (STREAM, NAME);                        \
-  fprintf (STREAM, "\n");                      \
-} while (0)
+#define ASM_OUTPUT_CONSTRUCTOR(STREAM, NAME)   \
+  do                                           \
+    {                                          \
+      ctors_section ();                                \
+      fprintf (STREAM, "%s", INT_ASM_OP);      \
+      assemble_name (STREAM, NAME);            \
+      fprintf (STREAM, "\n");                  \
+    }                                          \
+  while (0)
 
 /* A C statement (sans semicolon) to output an element in the table of
    global destructors.  */
 #undef ASM_OUTPUT_DESTRUCTOR
-#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
-do {                                           \
-  dtors_section ();                            \
-  fprintf (STREAM, "\t%s\t ", INT_ASM_OP);     \
-  assemble_name (STREAM, NAME);                \
-  fprintf (STREAM, "\n");                      \
-} while (0)
+#define ASM_OUTPUT_DESTRUCTOR(STREAM, NAME)    \
+  do                                           \
+    {                                          \
+      dtors_section ();                                \
+      fprintf (STREAM, "%s", INT_ASM_OP);      \
+      assemble_name (STREAM, NAME);            \
+      fprintf (STREAM, "\n");                  \
+    }                                          \
+  while (0)
 
 /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script.  */
 #define CTOR_LISTS_DEFINED_EXTERNALLY
@@ -201,5 +208,5 @@ do {                                                \
 #define HAVE_ATEXIT
 
 /* The ARM development system defines __main.  */
-#define NAME__MAIN "__gccmain"
+#define NAME__MAIN  "__gccmain"
 #define SYMBOL__MAIN __gccmain