vax-protos.h: New file.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 18 Jan 2000 23:02:03 +0000 (23:02 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 18 Jan 2000 23:02:03 +0000 (23:02 +0000)
        * vax-protos.h: New file.

        * vax.c: Fix compile time warnings.

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

        * vax.md: Likewise.

        * vaxv.md: Likewise.

From-SVN: r31493

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

index 1055cb1686cec4d288bfcdb3c6da14c39e7f6cf0..f541f0a0fd1a9bb7ac567096ea9a4f72724c5f1d 100644 (file)
@@ -1,3 +1,16 @@
+2000-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * vax-protos.h: New file.
+
+       * vax.c: Fix compile time warnings.
+       
+       * vax.h: Move prototypes to vax-protos.h.  Fix compile time
+       warnings.
+
+       * vax.md: Likewise.
+
+       * vaxv.md: Likewise.
+
 2000-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * romp-protos.h: New file.
diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h
new file mode 100644 (file)
index 0000000..f770871
--- /dev/null
@@ -0,0 +1,38 @@
+/* Definitions of target machine for GNU compiler.  Vax version.
+   Copyright (C) 2000 Free Software Foundation, Inc.
+
+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 2, 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.  */
+
+#ifdef RTX_CODE
+extern const char *rev_cond_name PARAMS ((rtx));
+extern void split_quadword_operands PARAMS ((rtx *, rtx *, int));
+extern void print_operand_address PARAMS ((FILE *, rtx));
+extern int vax_float_literal PARAMS ((rtx));
+extern int vax_address_cost PARAMS ((rtx));
+extern int vax_rtx_cost PARAMS ((rtx));
+#endif /* RTX_CODE */
+
+#ifdef REAL_VALUE_TYPE
+extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *, int));
+#endif /* REAL_VALUE_TYPE */
+
+#ifdef TREE_CODE
+extern void vms_check_external PARAMS ((tree, const char *, int));
+#endif /* TREE_CODE */
+
+extern void vms_flush_pending_externals PARAMS ((FILE *));
index 9eab182b80eca4330ae7ce1be7a9715aff75e145..1ccc3eb7b6ae529aae9fd622bfa29c69cdd82161 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines for insn-output.c for Vax.
-   Copyright (C) 1987, 94, 95, 97, 98, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1987, 94, 95, 97-99, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -33,13 +33,14 @@ Boston, MA 02111-1307, USA.  */
 #ifdef VMS_TARGET
 #include "tree.h"
 #endif
+#include "tm_p.h"
 
 /* This is like nonimmediate_operand with a restriction on the type of MEM.  */
 
 void
 split_quadword_operands (operands, low, n)
      rtx *operands, *low;
-     int n;
+     int n ATTRIBUTE_UNUSED;
 {
   int i;
   /* Split operands.  */
@@ -68,11 +69,12 @@ split_quadword_operands (operands, low, n)
     }
 }
 \f
+void
 print_operand_address (file, addr)
      FILE *file;
      register rtx addr;
 {
-  register rtx reg1, reg2, breg, ireg;
+  register rtx reg1, breg, ireg;
   rtx offset;
 
  retry:
@@ -250,7 +252,7 @@ print_operand_address (file, addr)
     }
 }
 \f
-char *
+const char *
 rev_cond_name (op)
      rtx op;
 {
@@ -287,8 +289,10 @@ vax_float_literal(c)
     register rtx c;
 {
   register enum machine_mode mode;
+#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT
   int i;
   union {double d; int i[2];} val;
+#endif
 
   if (GET_CODE (c) != CONST_DOUBLE)
     return 0;
@@ -324,7 +328,8 @@ vax_float_literal(c)
    2 - indirect */
 
 
-int vax_address_cost(addr)
+int
+vax_address_cost (addr)
     register rtx addr;
 {
   int reg = 0, indexed = 0, indir = 0, offset = 0, predec = 0;
@@ -366,6 +371,8 @@ int vax_address_cost(addr)
       indir = 2;       /* 3 on VAX 2 */
       addr = XEXP (addr, 0);
       goto restart;
+    default:
+      break;
     }
 
   /* Up to 3 things can be added in an address.  They are stored in
@@ -428,6 +435,8 @@ vax_rtx_cost (x)
        case QImode:
          c = 10;               /* 3-4 on VAX 9000, 20-28 on VAX 2 */
          break;
+       default:
+         break;
        }
       break;
     case UDIV:
@@ -583,7 +592,7 @@ vax_rtx_cost (x)
 
 /* Check a `double' value for validity for a particular machine mode.  */
 
-static char *float_strings[] =
+static const char *const float_strings[] =
 {
    "1.70141173319264430e+38", /* 2^127 (2^24 - 1) / 2^24 */
   "-1.70141173319264430e+38",
@@ -662,7 +671,7 @@ check_float_value (mode, d, overflow)
 static
 struct extern_list {
   struct extern_list *next;    /* next external */
-  char *name;                  /* name of the external */
+  const char *name;            /* name of the external */
   int size;                    /* external's actual size */
   int in_const;                        /* section type flag */
 } *extern_head = 0, *pending_head = 0;
@@ -673,7 +682,7 @@ struct extern_list {
 void
 vms_check_external (decl, name, pending)
      tree decl;
-     char *name;
+     const char *name;
      int pending;
 {
   register struct extern_list *p, *p0;
index 35f3fbdc0e733ec034e2eb33c8753e9899e2c070..db61a50a52b6cc119bf1dd8227a419799c16268f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Vax version.
-   Copyright (C) 1987, 88, 91, 93-98, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 91, 93-99, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -258,7 +258,7 @@ enum reg_class { NO_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, 0xffff}
+#define REG_CLASS_CONTENTS {{0}, {0xffff}}
 
 /* The same information, inverted:
    Return the class number of the smallest class containing
@@ -1270,8 +1270,7 @@ VAX operand formatting codes:
   ((CODE) == '#')
 
 #define PRINT_OPERAND(FILE, X, CODE)  \
-{ extern char *rev_cond_name ();                                       \
-  if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE);                      \
+{ if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE);                      \
   else if (CODE == 'C')                                                        \
     fputs (rev_cond_name (X), FILE);                                   \
   else if (CODE == 'D' && GET_CODE (X) == CONST_INT && INTVAL (X) < 0) \
index 0f48a314415f64b06fa2fdd2ed37e2abf981a44a..9097b1cc9dacdc329bac82bb9d74ef04dcf136ec 100644 (file)
@@ -1,5 +1,5 @@
 ;; Machine description for GNU compiler, Vax Version
-;; Copyright (C) 1987, 88, 91, 94-96, 1998, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 88, 91, 94-96, 98, 99, 2000 Free Software Foundation, Inc.
 
 ;; This file is part of GNU CC.
 
   "*
 {
   rtx low[3];
-  char *pattern;
+  const char *pattern;
   int carry = 1;
 
   split_quadword_operands (operands, low, 3);
   "*
 {
   rtx low[3];
-  char *pattern;
+  const char *pattern;
   int carry = 1;
 
   split_quadword_operands (operands, low, 3);
index 57dff406b919b46a283a1ef95d605d7fd2772835..ed61d23b8bf8a9d54ba831a98cfe8155351cd0cc 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Vax sysV version.
-   Copyright (C) 1988, 1993, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1993, 1996, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -51,7 +51,7 @@ output_file_directive ((FILE), main_input_filename)
 
 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                 \
 do {                                                   \
-  unsigned char *s;                                    \
+  const unsigned char *s;                              \
   int i;                                               \
   for (i = 0, s = (PTR); i < (LEN); s++, i++)          \
     {                                                  \