OSDN Git Service

* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / aout.h
index cab0a90..9832eda 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM with a.out
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rearnsha@armltd.co.uk).
    
 This file is part of GNU CC.
@@ -25,25 +26,29 @@ Boston, MA 02111-1307, USA.  */
 
 /* The text to go at the start of the assembler file */
 #ifndef ASM_FILE_START
-#define ASM_FILE_START(STREAM)                                             \
-{                                                                          \
-  fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%ssl\t.req\t%sr10\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%sfp\t.req\t%sr11\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%sip\t.req\t%sr12\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%ssp\t.req\t%sr13\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%slr\t.req\t%sr14\n", REGISTER_PREFIX, REGISTER_PREFIX); \
-  fprintf (STREAM,"%spc\t.req\t%sr15\n", REGISTER_PREFIX, REGISTER_PREFIX); \
+#define ASM_FILE_START(STREAM)             \
+{                                          \
+  asm_fprintf (STREAM,"%Rrfp\t.req\t%Rr9\n"); \
+  asm_fprintf (STREAM,"%Rsl\t.req\t%Rr10\n"); \
+  asm_fprintf (STREAM,"%Rfp\t.req\t%Rr11\n"); \
+  asm_fprintf (STREAM,"%Rip\t.req\t%Rr12\n"); \
+  asm_fprintf (STREAM,"%Rsp\t.req\t%Rr13\n"); \
+  asm_fprintf (STREAM,"%Rlr\t.req\t%Rr14\n"); \
+  asm_fprintf (STREAM,"%Rpc\t.req\t%Rr15\n"); \
 }
 #endif
 
+#ifndef ASM_APP_ON
 #define ASM_APP_ON             ""
+#endif
+#ifndef ASM_APP_OFF
 #define ASM_APP_OFF            ""
+#endif
 
 /* Switch to the text or data segment.  */
-#define TEXT_SECTION_ASM_OP    ".text"
-#define DATA_SECTION_ASM_OP    ".data"
-#define BSS_SECTION_ASM_OP     ".bss"
+#define TEXT_SECTION_ASM_OP    "\t.text"
+#define DATA_SECTION_ASM_OP    "\t.data"
+#define BSS_SECTION_ASM_OP     "\t.bss"
 
 /* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
    make sure that this change is reflected in the function
@@ -68,7 +73,7 @@ Boston, MA 02111-1307, USA.  */
   "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",  \
   "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc",  \
   "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",  \
-  "cc", "sfp", "afp"                              \
+  "cc", "sfp", "afp"                              \
 }
 #endif
 
@@ -100,10 +105,9 @@ Boston, MA 02111-1307, USA.  */
 /* Arm Assembler barfs on dollars */
 #define DOLLARS_IN_IDENTIFIERS 0
 
+#ifndef NO_DOLLAR_IN_LABEL
 #define NO_DOLLAR_IN_LABEL 1
-
-/* DBX register number for a given compiler register number */
-#define DBX_REGISTER_NUMBER(REGNO)  (REGNO)
+#endif
 
 /* Generate DBX debugging information.  riscix.h will undefine this because
    the native assembler does not support stabs. */
@@ -185,16 +189,17 @@ Boston, MA 02111-1307, USA.  */
    the riscix assembler doesn't understand (it also makes cross-assembling
    less likely to fail). */
 
-#define ASM_OUTPUT_LONG_DOUBLE(STREAM, VALUE)                                  \
-  do                                                                           \
-    {                                                                          \
-      char dstr[30];                                                           \
-      long l[3];                                                               \
-      REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);                             \
-      REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);                            \
-      fprintf (STREAM, "\t.long 0x%lx,0x%lx,0x%lx\t%s long double %s\n",       \
-              l[0], l[1], l[2], ASM_COMMENT_START, dstr);                      \
-    }                                                                          \
+#define ASM_OUTPUT_LONG_DOUBLE(STREAM, VALUE)                          \
+  do                                                                   \
+    {                                                                  \
+      char dstr[30];                                                   \
+      long l[3];                                                       \
+      REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);                     \
+      REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);                    \
+      asm_fprintf (STREAM,                                             \
+                  "\t.long 0x%lx,0x%lx,0x%lx\t%@ long double %s\n",    \
+                  l[0], l[1], l[2], dstr);                             \
+    }                                                                  \
   while (0)
 
 #define ASM_OUTPUT_DOUBLE(STREAM, VALUE)                               \
@@ -204,8 +209,8 @@ Boston, MA 02111-1307, USA.  */
       long l[2];                                                       \
       REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);                          \
       REAL_VALUE_TO_DECIMAL (VALUE, "%.14g", dstr);                    \
-      fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%s double %s\n", l[0],   \
-              l[1], ASM_COMMENT_START, dstr);                          \
+      asm_fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%@ double %s\n", l[0],\
+                  l[1], dstr);                                         \
     }                                                                  \
   while (0)
 
@@ -216,45 +221,17 @@ Boston, MA 02111-1307, USA.  */
       long l;                                                  \
       REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);                  \
       REAL_VALUE_TO_DECIMAL (VALUE, "%.7g", dstr);             \
-      fprintf (STREAM, "\t.word 0x%lx\t%s float %s\n", l,      \
-              ASM_COMMENT_START, dstr);                        \
+      asm_fprintf (STREAM, "\t.word 0x%lx\t%@ float %s\n", l,  \
+                  dstr);                                       \
     }                                                          \
   while (0)
 
-#define ASM_OUTPUT_INT(STREAM, EXP)            \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.word\t");           \
-      OUTPUT_INT_ADDR_CONST (STREAM, EXP);     \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)          \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.short\t");          \
-      output_addr_const (STREAM, EXP);         \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)           \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.byte\t");           \
-      output_addr_const (STREAM, EXP);         \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE)         \
-  fprintf (STREAM, "\t.byte\t%d\n", VALUE)
-
+#undef  ASM_OUTPUT_ASCII
 #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN)  \
-  output_ascii_pseudo_op (STREAM, (unsigned char *)(PTR), LEN)
+  output_ascii_pseudo_op (STREAM, (const unsigned char *)(PTR), LEN)
 
 /* Output a gap.  In fact we fill it with nulls.  */
+#undef  ASM_OUTPUT_SKIP
 #define ASM_OUTPUT_SKIP(STREAM, NBYTES)        \
   fprintf (STREAM, "\t.space\t%d\n", NBYTES)
 
@@ -280,8 +257,8 @@ Boston, MA 02111-1307, USA.  */
     {                                                  \
       fprintf (STREAM, "\t.comm\t");                   \
       assemble_name (STREAM, NAME);                    \
-      fprintf (STREAM, ", %d\t%s %d\n", ROUNDED,       \
-              ASM_COMMENT_START, SIZE);                \
+      asm_fprintf (STREAM, ", %d\t%@ %d\n",            \
+                  ROUNDED, SIZE);                      \
     }                                                  \
   while (0)
 #endif
@@ -311,38 +288,15 @@ Boston, MA 02111-1307, USA.  */
 /* Output a source line for the debugger.  */
 /* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
 
-/* Output a section name.  */
-#ifndef ASM_OUTPUT_SECTION_NAME
-#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)                    \
-  do                                                                        \
-    {                                                                       \
-      if (strcmp (NAME, ".text") != 0 && strcmp (NAME, ".data") != 0)       \
-        {                                                                   \
-          fprintf (stderr,                                                  \
-"Section attribute supported only for sections \".text\" and \".data\".\n"); \
-          abort ();                                                         \
-        }                                                                    \
-      else                                                                  \
-        fprintf (FILE, "%s\n", NAME);                                       \
-    }                                                                       \
-  while (0)
-#endif
-
 /* Output a #ident directive.  */
 #ifndef ASM_OUTPUT_IDENT
 #define ASM_OUTPUT_IDENT(STREAM,STRING)  \
-  fprintf (STREAM, "%s - - - ident %s\n", ASM_COMMENT_START, STRING)
+  asm_fprintf (STREAM, "%@ - - - ident %s\n", STRING)
 #endif
      
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN                 "("
-#define ASM_CLOSE_PAREN        ")"
-
 #ifndef ASM_COMMENT_START
 #define ASM_COMMENT_START      "@"
 #endif
 
 /* This works for GAS and some other assemblers.  */
-#define SET_ASM_OP             ".set"
-
-#include "arm/arm.h"
+#define SET_ASM_OP             "\t.set\t"