OSDN Git Service

* elxsi-protos.h: New file.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jan 2000 16:00:37 +0000 (16:00 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jan 2000 16:00:37 +0000 (16:00 +0000)
* elxsi.c: Include tm_p.h.  Add static prototypes.  Fix compile
time warnings.

* elxsi.h: Move prototypes to elxsi-protos.h.  Fix compile time
warnings.

* elxsi.md: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31414 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/elxsi/elxsi-protos.h [new file with mode: 0644]
gcc/config/elxsi/elxsi.c
gcc/config/elxsi/elxsi.h
gcc/config/elxsi/elxsi.md

index ddfa5ed..4431b3e 100644 (file)
@@ -1,3 +1,15 @@
+2000-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * elxsi-protos.h: New file.
+
+       * elxsi.c: Include tm_p.h.  Add static prototypes.  Fix compile
+       time warnings.
+       
+       * elxsi.h: Move prototypes to elxsi-protos.h.  Fix compile time
+       warnings.
+       
+       * elxsi.md: Likewise.
+
 2000-01-14  Clinton Popetz  <cpopetz@cygnus.com>
 
        * config/mips/mips.h (REGISTER_MOVE_COST): Remove redundant
diff --git a/gcc/config/elxsi/elxsi-protos.h b/gcc/config/elxsi/elxsi-protos.h
new file mode 100644 (file)
index 0000000..9889da0
--- /dev/null
@@ -0,0 +1,31 @@
+/* Definitions of target machine for GNU compiler.  Elxsi version.
+   Copyright (C) 2000 Free Software Foundation, Inc.
+   Contributed by Mike Stump <mrs@cygnus.com> in 1988.  This is the first
+   64 bit port of GNU CC.
+   Based upon the VAX port.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+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, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Functions used in the md file. */
+
+#ifdef RTX_CODE
+extern const char *cmp_set PARAMS ((const char *, const char *, rtx));
+extern const char *cmp_jmp PARAMS ((const char *, int, rtx));
+extern void print_operand_address PARAMS ((FILE *, rtx));
+#endif /* RTX_CODE */
+
index 77dac67..4242b38 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines for insn-output.c for GNU compiler.  Elxsi version.
-   Copyright (C) 1987, 1992, 1998, 1999 Free Software Foundation, Inc
+   Copyright (C) 1987, 1992, 1998, 1999, 2000 Free Software Foundation, Inc
    Contributrd by Mike Stump <mrs@cygnus.com> in 1988 and is the first
    64 bit port of GNU CC.
    Based upon the VAX port.
@@ -25,22 +25,29 @@ Boston, MA 02111-1307, USA.  */
 #include "system.h"
 #include "rtl.h"
 #include "function.h"
+#include "output.h"
+#include "tm_p.h"
 
 extern const char *reg_names[];
 rtx cmp_op0=0, cmp_op1=0;
 
 /* table of relations for compares and branches */
-char *cmp_tab[] = {
+static const char *const cmp_tab[] = {
     "gt", "gt", "eq", "eq", "ge", "ge", "lt", "lt", "ne", "ne",
     "le", "le" };
 
 /* type is the index into the above table */
 /* s is "" for signed, or "u" for unsigned */
-char *cmp_jmp(s, type, where) char *s; rtx where; {
+const char *
+cmp_jmp (s, type, where)
+     const char *s;
+     int type;
+     rtx where;
+{
     rtx br_ops[3];
     char template[50];
-    char *f = "";
-    char *bits = "64";
+    const char *f = "";
+    const char *bits = "64";
     if (GET_MODE (cmp_op0) == SFmode) f = "f", bits = "32";
     if (GET_MODE (cmp_op0) == DFmode) f = "f";
     br_ops[0] = where;
@@ -53,18 +60,22 @@ char *cmp_jmp(s, type, where) char *s; rtx where; {
        sprintf(template, "fcmp.br.%s\t%%1,=0:j%s\t%%l0",
                bits, cmp_tab[type]);
     else if (*s) /* can turn the below in to a jmp ... */
-       sprintf(template, "cmpu.br.64\t%%1,=0:j%s\t%%l0", s, cmp_tab[type]);
+       sprintf(template, "cmpu.br.64\t%%1,=0:j%s\t%%l0", s);
     else
        sprintf(template, "jmp.%s\t%%1,%%l0", cmp_tab[type+1]);
     output_asm_insn(template, br_ops);
     return "";
 }
 
-char *cmp_set(s, type, reg) char *s, *type; rtx reg; {
+const char *
+cmp_set (s, type, reg)
+     const char *s, *type;
+     rtx reg;
+{
     rtx br_ops[3];
     char template[50];
-    char *f = "";
-    char *bits = "64";
+    const char *f = "";
+    const char *bits = "64";
     if (GET_MODE (cmp_op0) == SFmode) f = "f", bits = "32";
     else if (GET_MODE (cmp_op0) == DFmode) f = "f";
     else if (GET_MODE (cmp_op0) == SImode) bits = "32";
@@ -83,6 +94,7 @@ char *cmp_set(s, type, reg) char *s, *type; rtx reg; {
     return "";
 }
 
+void
 print_operand_address (file, addr)
      FILE *file;
      register rtx addr;
@@ -90,7 +102,6 @@ print_operand_address (file, addr)
   register rtx reg1, reg2, breg, ireg;
   rtx offset;
 
- retry:
   switch (GET_CODE (addr))
     {
 
index 06e83f8..8b3e006 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Elxsi version.
-   Copyright (C) 1987, 88, 92, 95, 96, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 92, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
    Contributed by Mike Stump <mrs@cygnus.com> in 1988.  This is the first
    64 bit port of GNU CC.
    Based upon the VAX port.
@@ -234,7 +234,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
    This is an initializer for a vector of HARD_REG_SET
    of length N_REG_CLASSES.  */
 
-#define REG_CLASS_CONTENTS {0, 0x07fff, 0xffff}
+#define REG_CLASS_CONTENTS {{0}, {0x07fff}, {0xffff}}
 
 /* The same information, inverted:
    Return the class number of the smallest class containing
@@ -714,7 +714,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
   } while (0)
 
 /* Output at beginning of assembler file.  */
-#define ASM_FILE_START(FILE) fprintf (FILE, "");
+#define ASM_FILE_START(FILE) fputs ("", (FILE));
 
 /* Output to assembler file text saying following lines
    may contain character constants, extra white space, comments, etc.  */
@@ -882,7 +882,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
    to a multiple of 2**LOG bytes.  */
 
 #define ASM_OUTPUT_ALIGN(FILE,LOG)  \
-  if (LOG!=0) fprintf (FILE, "\t.align\t%d\n", (LOG)); else 0
+  do { if (LOG!=0) fprintf (FILE, "\t.align\t%d\n", (LOG)); } while (0)
 
 /* This is how to output an assembler line
    that says to advance the location counter by SIZE bytes.  */
@@ -954,11 +954,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
  print_operand_address (FILE, ADDR)
 
-/* Functions used in the md file. */
-
-extern char *cmp_set();
-extern char *cmp_jmp();
-
 /* These are stubs, and have yet to bee written. */
 
 #define TRAMPOLINE_SIZE 26
index 9611ac2..084ff36 100644 (file)
@@ -1,5 +1,5 @@
 ;;- Machine description for GNU compiler, Elxsi Version
-;;  Copyright (C) 1987, 1988, 1992, 1994 Free Software Foundation, Inc.
+;;  Copyright (C) 1987, 1988, 1992, 1994, 2000 Free Software Foundation, Inc.
 ;;  Contributed by Mike Stump <mrs@cygnus.com> in 1988, and is the first
 ;;  64 bit port of GNU CC.
 ;;  Based upon the VAX port.
       else
         return \"stin.64\\t%n1,%0\";
     }
+  else
+    abort();
 ")
 
 (define_insn "movsi"