OSDN Git Service

* 1750a.h (datalbl, jmplbl): Declare array size explicitly.
[pf3gnuchains/gcc-fork.git] / gcc / config / ns32k / encore.h
index a2342a4..07d4477 100644 (file)
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler.  ENCORE NS32000 version.
-   Copyright (C) 1988 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1993, 2000 Free Software Foundation, Inc.
    Adapted by Robert Brown (brown@harvard.harvard.edu) from the Sequent
-     version by Michael Tiemann (tiemann@mcc.com).
+   version by Michael Tiemann (tiemann@mcc.com).
 
 This file is part of GNU CC.
 
@@ -17,7 +17,8 @@ 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.  */
 
 
 #define EXTERNAL_PREFIX '?'
@@ -38,8 +39,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef ASM_OUTPUT_ADDR_DIFF_ELT
 #undef ASM_OUTPUT_ALIGN
 #undef ASM_OUTPUT_ASCII
-#undef ASM_OUTPUT_DOUBLE
-#undef ASM_OUTPUT_INT
 #undef ASM_OUTPUT_INTERNAL_LABEL
 #undef ASM_OUTPUT_LOCAL
 #undef CPP_PREDEFINES
@@ -54,7 +53,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define TARGET_VERSION fprintf (stderr, " (32000, Encore syntax)");
 /* Note Encore does not standardly do -Dencore.  */
 /* budd: should have a -ns32332 (or -apc) switch! but no harm for now */
-#define CPP_PREDEFINES "-Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix"
+#define CPP_PREDEFINES "-Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -Asystem=unix -Acpu=ns32k -Amachine=ns32k"
 
 /* Ignore certain cpp directives used in header files on sysV.  */
 #define SCCS_DIRECTIVE
@@ -75,32 +74,28 @@ output_file_directive ((FILE), main_input_filename)
 #define ASM_OUTPUT_ALIGN(FILE,LOG)                                     \
        fprintf (FILE, "\t.align %d\n", 1 << (LOG))
 
-/* The Encore assembler doesn't seem to accept this syntax.  */
-#undef ASM_OUTPUT_ALIGN_CODE
-#define ASM_OUTPUT_ALIGN_CODE(FILE)    \
-  fprintf (FILE, "\t.align 2\n")
+/* The Encore assembler doesn't seem to accept the usual second argument
+   and warns that .align may not work in the text section if optimization
+   is on.  */
+#undef LABEL_ALIGN_AFTER_BARRIER
+#define LABEL_ALIGN_AFTER_BARRIER(LABEL) 0
 
 /*
  *  Internal labels are prefixed with a period.
  */
 
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)                  \
-       sprintf (LABEL, "*.%s%d", PREFIX, NUM)
+       sprintf (LABEL, "*.%s%ld", PREFIX, (long)(NUM))
 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)                     \
        fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)                     \
-       fprintf (FILE, "\t.word .L%d-.LI%d\n", VALUE, REL)
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)               \
+       fprintf (FILE, "\t.double .L%d-.LI%d\n", VALUE, REL)
 
 /*
  *  Different syntax for integer constants, double constants, and
  *  uninitialized locals.
  */
 
-#define ASM_OUTPUT_INT(FILE,VALUE)                             \
-( fprintf (FILE, "\t.double "),                                        \
-  output_addr_const (FILE, (VALUE)),                           \
-  fprintf (FILE, "\n"))
-
 #define ASM_OUTPUT_LABELREF_AS_INT(STREAM, NAME)                       \
 do {                                                                   \
   fprintf (STREAM, "\t.double\t");                                     \
@@ -109,9 +104,6 @@ do {                                                                        \
 } while (0)
 
 
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE)                          \
- fprintf (FILE, "\t.long 0f%.20e\n", (VALUE))
-
 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)            \
 ( fputs ("\t.bss ", (FILE)),                                   \
   assemble_name ((FILE), (NAME)),                              \
@@ -125,15 +117,18 @@ do {                                                                      \
   */
 
 #define ASM_OUTPUT_ASCII(file, p, size)                        \
-{                                                      \
-  for (i = 0; i < (size); i++)                         \
+do {                                                   \
+  size_t i, limit = (size);                            \
+  for (i = 0; i < limit; i++)                          \
     {                                                  \
       register int c = (p)[i];                         \
       if ((i / 40) * 40 == i)                          \
-      if (i == 0)                                      \
-        fprintf ((file), "\t.ascii \"");               \
-      else                                             \
-        fprintf ((file), "\"\n\t.ascii \"");           \
+        {                                              \
+          if (i == 0)                                  \
+            fprintf ((file), "\t.ascii \"");           \
+          else                                         \
+            fprintf ((file), "\"\n\t.ascii \"");       \
+        }                                              \
       if (c == '\"' || c == '\\')                      \
         putc ('\\', (file));                           \
       if (c >= ' ' && c < 0177)                                \
@@ -141,13 +136,12 @@ do {                                                                      \
       else                                             \
         {                                              \
           fprintf ((file), "\\%o", c);                 \
-          if (i < (size) - 1                           \
-              && (p)[i + 1] >= '0' && (p)[i + 1] <= '9')\
+          if (i < limit - 1 && ISDIGIT ((p)[i + 1]))   \
           fprintf ((file), "\"\n\t.ascii \"");         \
         }                                              \
     }                                                  \
   fprintf ((file), "\"\n");                            \
-}
+} while (0)
 
 /* Modify syntax of jsr instructions.  */
 #define CALL_MEMREF_IMPLICIT
@@ -169,7 +163,7 @@ do {                                                                        \
     
 /* Assembler pseudo-op for shared data segment. */
 
-#define SHARED_SECTION_ASM_OP ".shrdata"
+#define SHARED_SECTION_ASM_OP "\t.shrdata"
 
 /* This says how to output an assembler line
    to define a shared common symbol. */