OSDN Git Service

* config/xtensa/xtensa.c (xtensa_va_arg): Fix to handle arguments
[pf3gnuchains/gcc-fork.git] / gcc / config / vax / vax.h
index 99386c0..72c7f3d 100644 (file)
@@ -1,5 +1,6 @@
-/* Definitions of target machine for GNU compiler.  Vax version.
-   Copyright (C) 1987, 88, 91, 93, 94, 95 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.  VAX version.
+   Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -18,14 +19,19 @@ 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.  */
 
+#define VMS_TARGET 0
 
 /* Names to predefine in the preprocessor for this target machine.  */
 
-#define CPP_PREDEFINES "-Dvax -D__vax__ -Dunix -Asystem(unix) -Asystem(bsd) -Acpu(vax) -Amachine(vax)"
+#define CPP_PREDEFINES "-Dvax -D__vax__ -Dunix -Asystem=unix -Asystem=bsd -Acpu=vax -Amachine=vax"
+
+/* Use -J option for long branch support with Unix assembler.  */
+
+#define ASM_SPEC "-J"
 
 /* If using g-format floating point, alter math.h.  */
 
-#define        CPP_SPEC "%{mg:-DGFLOAT}"
+#define        CPP_SPEC "%{mg:%{!ansi:-DGFLOAT} -D__GFLOAT}"
 
 /* Choose proper libraries depending on float format.
    Note that there are no profiling libraries for g-format.
@@ -39,7 +45,10 @@ Boston, MA 02111-1307, USA.  */
 
 /* Print subsidiary information on the compiler version in use.  */
 
-#define TARGET_VERSION fprintf (stderr, " (vax)");
+#ifndef TARGET_NAME    /* A more specific value might be supplied via -D.  */
+#define TARGET_NAME "vax"
+#endif
+#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME)
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
@@ -62,15 +71,15 @@ extern int target_flags;
    where VALUE is the bits to set or minus the bits to clear.
    An empty string NAME is used to identify the default VALUE.  */
 
-#define TARGET_SWITCHES  \
-  { {"unix", 1},  \
-    {"gnu", -1},  \
-    {"vaxc-alignment", 2}, \
-    {"g", 4}, \
-    {"g-float", 4}, \
-    {"d", -4}, \
-    {"d-float", -4}, \
-    { "", TARGET_DEFAULT}}
+#define TARGET_SWITCHES                                                \
+  { {"unix", 1, "Generate code for UNIX assembler"},           \
+    {"gnu", -1, "Generate code for GNU assembler (gas)"},      \
+    {"vaxc-alignment", 2, "Use VAXC structure conventions"},   \
+    {"g", 4, "Generate GFLOAT double precision code"},         \
+    {"g-float", 4, "Generate GFLOAT double precision code"},   \
+    {"d", -4, "Generate DFLOAT double precision code"},                \
+    {"d-float", -4, "Generate DFLOAT double precision code"},  \
+    { "", TARGET_DEFAULT, 0}}
 
 /* Default target_flags if no switches specified.  */
 
@@ -80,40 +89,23 @@ extern int target_flags;
 \f
 /* Target machine storage layout */
 
-/* Define for software floating point emulation of VAX format
-   when cross compiling from a non-VAX host. */
-/* #define REAL_ARITHMETIC */
-
 /* Define this if most significant bit is lowest numbered
    in instructions that operate on numbered bit-fields.
-   This is not true on the vax.  */
+   This is not true on the VAX.  */
 #define BITS_BIG_ENDIAN 0
 
 /* Define this if most significant byte of a word is the lowest numbered.  */
-/* That is not true on the vax.  */
+/* That is not true on the VAX.  */
 #define BYTES_BIG_ENDIAN 0
 
 /* Define this if most significant word of a multiword number is the lowest
    numbered.  */
-/* This is not true on the vax.  */
+/* This is not true on the VAX.  */
 #define WORDS_BIG_ENDIAN 0
 
-/* Number of bits in an addressable storage unit */
-#define BITS_PER_UNIT 8
-
-/* Width in bits of a "word", which is the contents of a machine register.
-   Note that this is not necessarily the width of data type `int';
-   if using 16-bit ints on a 68000, this would still be 32.
-   But on a machine with 16-bit registers, this would be 16.  */
-#define BITS_PER_WORD 32
-
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD 4
 
-/* Width in bits of a pointer.
-   See also the macro `Pmode' defined below.  */
-#define POINTER_SIZE 32
-
 /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
 #define PARM_BOUNDARY 32
 
@@ -141,6 +133,10 @@ extern int target_flags;
 
 /* Let's keep the stack somewhat aligned.  */
 #define STACK_BOUNDARY 32
+
+/* The table of an ADDR_DIFF_VEC must be contiguous with the case
+   opcode, it is part of the case instruction.  */
+#define ADDR_VEC_ALIGN(ADDR_VEC) 0
 \f
 /* Standard register usage.  */
 
@@ -153,7 +149,7 @@ extern int target_flags;
 
 /* 1 for registers that have pervasive standard uses
    and are not available for the register allocator.
-   On the vax, these are the AP, FP, SP and PC.  */
+   On the VAX, these are the AP, FP, SP and PC.  */
 #define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
 
 /* 1 for registers not available across function calls.
@@ -168,12 +164,12 @@ extern int target_flags;
    to hold something of mode MODE.
    This is ordinarily the length in words of a value of mode MODE
    but can be less for certain modes in special long registers.
-   On the vax, all registers are one word long.  */
+   On the VAX, all registers are one word long.  */
 #define HARD_REGNO_NREGS(REGNO, MODE)   \
  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
-   On the vax, all registers can hold all modes.  */
+   On the VAX, all registers can hold all modes.  */
 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
 
 /* Value is 1 if it is a good idea to tie two pseudo registers
@@ -185,7 +181,7 @@ extern int target_flags;
 /* Specify the registers used for certain standard purposes.
    The values of these macros are register numbers.  */
 
-/* Vax pc is overloaded on a register.  */
+/* VAX pc is overloaded on a register.  */
 #define PC_REGNUM 15
 
 /* Register to use for pushing function arguments.  */
@@ -230,7 +226,7 @@ extern int target_flags;
    For any two classes, it is very desirable that there be another
    class that represents their union.  */
    
-/* The vax has only one kind of registers, so NO_REGS and ALL_REGS
+/* The VAX has only one kind of registers, so NO_REGS and ALL_REGS
    are the only classes.  */
 
 enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
@@ -242,7 +238,7 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
 
 #define GENERAL_REGS ALL_REGS
 
-/* Give names of register classes as strings for dump file.   */
+/* Give names of register classes as strings for dump file.  */
 
 #define REG_CLASS_NAMES \
  {"NO_REGS", "ALL_REGS" }
@@ -251,7 +247,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
@@ -310,7 +306,7 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
 
 /* Return the maximum number of consecutive registers
    needed to represent mode MODE in a register of class CLASS.  */
-/* On the vax, this is always the size of MODE in words,
+/* On the VAX, this is always the size of MODE in words,
    since all registers are the same size.  */
 #define CLASS_MAX_NREGS(CLASS, MODE)   \
  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
@@ -321,10 +317,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if longjmp restores from saved registers
-   rather than from what setjmp saved.  */
-#define LONGJMP_RESTORE_FROM_STACK
-
 /* Define this if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
@@ -340,12 +332,11 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
 /* Given an rtx for the address of a frame,
    return an rtx for the address of the word in the frame
    that holds the dynamic chain--the previous frame's address.  */
-#define DYNAMIC_CHAIN_ADDRESS(frame) \
-gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
+#define DYNAMIC_CHAIN_ADDRESS(FRAME) plus_constant ((FRAME), 12)
 
 /* If we generate an insn to push BYTES bytes,
    this says how many the stack pointer really advances by.
-   On the vax, -(sp) pushes only the bytes of the operands.  */
+   On the VAX, -(sp) pushes only the bytes of the operands.  */
 #define PUSH_ROUNDING(BYTES) (BYTES)
 
 /* Offset of first parameter from the argument pointer register value.  */
@@ -358,26 +349,27 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    or for a library call it is an identifier node for the subroutine name.
    SIZE is the number of bytes of arguments passed on the stack.
 
-   On the Vax, the RET insn always pops all the args for any function.  */
+   On the VAX, the RET insn pops a maximum of 255 args for any function.  */
 
-#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE)
+#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
+  ((SIZE) > 255*4 ? 0 : (SIZE))
 
 /* Define how to find the value returned by a function.
    VALTYPE is the data type of the value (as a tree).
    If the precise function being called is known, FUNC is its FUNCTION_DECL;
    otherwise, FUNC is 0.  */
 
-/* On the Vax the return value is in R0 regardless.  */   
+/* On the VAX the return value is in R0 regardless.  */   
 
 #define FUNCTION_VALUE(VALTYPE, FUNC)  \
-  gen_rtx (REG, TYPE_MODE (VALTYPE), 0)
+  gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
 
 /* Define how to find the value returned by a library function
    assuming the value has mode MODE.  */
 
-/* On the Vax the return value is in R0 regardless.  */   
+/* On the VAX the return value is in R0 regardless.  */   
 
-#define LIBCALL_VALUE(MODE)  gen_rtx (REG, MODE, 0)
+#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, 0)
 
 /* Define this if PCC uses the nonreentrant convention for returning
    structure and union values.  */
@@ -385,12 +377,12 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 #define PCC_STATIC_STRUCT_RETURN
 
 /* 1 if N is a possible register number for a function value.
-   On the Vax, R0 is the only register thus used.  */
+   On the VAX, R0 is the only register thus used.  */
 
 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
 
 /* 1 if N is a possible register number for function argument passing.
-   On the Vax, no registers are used in this way.  */
+   On the VAX, no registers are used in this way.  */
 
 #define FUNCTION_ARG_REGNO_P(N) 0
 \f
@@ -400,7 +392,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    and about the args processed so far, enough to enable macros
    such as FUNCTION_ARG to determine where the next arg should go.
 
-   On the vax, this is a single integer, which is a number of bytes
+   On the VAX, this is a single integer, which is a number of bytes
    of arguments scanned so far.  */
 
 #define CUMULATIVE_ARGS int
@@ -409,9 +401,9 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    for a call to a function whose data type is FNTYPE.
    For a library call, FNTYPE is 0.
 
-   On the vax, the offset starts at 0.  */
+   On the VAX, the offset starts at 0.  */
 
-#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME      \
+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)      \
  ((CUM) = 0)
 
 /* Update the data in CUM to advance over an argument
@@ -436,33 +428,10 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    NAMED is nonzero if this argument is a named parameter
     (otherwise it is an extra parameter matching an ellipsis).  */
 
-/* On the vax all args are pushed.  */   
+/* On the VAX all args are pushed.  */   
 
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0
 
-/* This macro generates the assembly code for function entry.
-   FILE is a stdio stream to output the code to.
-   SIZE is an int: how many units of temporary storage to allocate.
-   Refer to the array `regs_ever_live' to determine which registers
-   to save; `regs_ever_live[I]' is nonzero if register number I
-   is ever used in the function.  This macro is responsible for
-   knowing which registers should not be saved even if used.  */
-
-#define FUNCTION_PROLOGUE(FILE, SIZE)     \
-{ register int regno;                                          \
-  register int mask = 0;                                       \
-  extern char call_used_regs[];                                        \
-  for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)      \
-    if (regs_ever_live[regno] && !call_used_regs[regno])       \
-       mask |= 1 << regno;                                     \
-  fprintf (FILE, "\t.word 0x%x\n", mask);                      \
-  MAYBE_VMS_FUNCTION_PROLOGUE(FILE)                            \
-  if ((SIZE) >= 64) fprintf (FILE, "\tmovab %d(sp),sp\n", -SIZE);\
-  else if (SIZE) fprintf (FILE, "\tsubl2 $%d,sp\n", (SIZE)); }
-
-/* vms.h redefines this.  */
-#define MAYBE_VMS_FUNCTION_PROLOGUE(FILE)
-
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  */
 
@@ -496,19 +465,12 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 
 #define EXIT_IGNORE_STACK 1
 
-/* This macro generates the assembly code for function exit,
-   on machines that need it.  If FUNCTION_EPILOGUE is not defined
-   then individual return instructions are generated for each
-   return statement.  Args are same as for FUNCTION_PROLOGUE.  */
-
-/* #define FUNCTION_EPILOGUE(FILE, SIZE)  */
-
 /* Store in the variable DEPTH the initial difference between the
    frame pointer reg contents and the stack pointer reg contents,
    as of the start of the function body.  This depends on the layout
    of the fixed parts of the stack frame and on how registers are saved.
 
-   On the Vax, FRAME_POINTER_REQUIRED is always 1, so the definition of this
+   On the VAX, FRAME_POINTER_REQUIRED is always 1, so the definition of this
    macro doesn't matter.  But it must be defined.  */
 
 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0;
@@ -516,19 +478,19 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 /* Output assembler code for a block containing the constant parts
    of a trampoline, leaving space for the variable parts.  */
 
-/* On the vax, the trampoline contains an entry mask and two instructions:
+/* On the VAX, the trampoline contains an entry mask and two instructions:
      .word NN
      movl $STATIC,r0   (store the functions static chain)
      jmp  *$FUNCTION   (jump to function code at address FUNCTION)  */
 
 #define TRAMPOLINE_TEMPLATE(FILE)                                      \
 {                                                                      \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                                 \
-  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x8fd0));      \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
-  ASM_OUTPUT_BYTE  (FILE, 0x50+STATIC_CHAIN_REGNUM);                   \
-  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x9f17));      \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, GEN_INT (0x8fd0));                      \
+  assemble_aligned_integer (4, const0_rtx);                            \
+  assemble_aligned_integer (1, GEN_INT (0x50 + STATIC_CHAIN_REGNUM));  \
+  assemble_aligned_integer (2, GEN_INT (0x9f17));                      \
+  assemble_aligned_integer (4, const0_rtx);                            \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -543,12 +505,12 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    to the start of the trampoline.  */
 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                      \
 {                                                                      \
-  emit_insn (gen_rtx (ASM_INPUT, VOIDmode,                             \
-                     "movpsl -(sp)\n\tpushal 1(pc)\n\trei"));          \
-  emit_move_insn (gen_rtx (MEM, HImode, TRAMP),                                \
-                 gen_rtx (MEM, HImode, FNADDR));                       \
-  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)), CXT);\
-  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 11)),    \
+  emit_insn (gen_rtx_ASM_INPUT (VOIDmode,                              \
+                               "movpsl -(sp)\n\tpushal 1(pc)\n\trei")); \
+  emit_move_insn (gen_rtx_MEM (HImode, TRAMP),                         \
+                 gen_rtx_MEM (HImode, FNADDR));                        \
+  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT);\
+  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 11)),     \
                  plus_constant (FNADDR, 2));                           \
 }
 
@@ -563,16 +525,18 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    can ignore COUNT.  */
 
 #define RETURN_ADDR_RTX(COUNT, FRAME)  \
-  gen_rtx (MEM, Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET))
+  ((COUNT == 0)                                \
+   ? gen_rtx_MEM (Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET)) \
+   : (rtx) 0)
 
 \f
 /* Addressing modes, and classification of registers for them.  */
 
-#define HAVE_POST_INCREMENT
-/* #define HAVE_POST_DECREMENT */
+#define HAVE_POST_INCREMENT 1
+/* #define HAVE_POST_DECREMENT */
 
-#define HAVE_PRE_DECREMENT
-/* #define HAVE_PRE_INCREMENT */
+#define HAVE_PRE_DECREMENT 1
+/* #define HAVE_PRE_INCREMENT */
 
 /* Macros to check register numbers against specific register classes.  */
 
@@ -710,25 +674,25 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
       && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob))         \
     goto ADDR; }
 
-/* 1 if PROD is either a reg times size of mode MODE
-   or just a reg, if MODE is just one byte.
+/* 1 if PROD is either a reg times size of mode MODE and MODE is less
+   than or equal 8 bytes, or just a reg if MODE is one byte.
    This macro's expansion uses the temporary variables xfoo0 and xfoo1
    that must be declared in the surrounding context.  */
 #define INDEX_TERM_P(PROD, MODE)   \
 (GET_MODE_SIZE (MODE) == 1                                             \
  ? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD))                        \
- : (GET_CODE (PROD) == MULT                                            \
+ : (GET_CODE (PROD) == MULT && GET_MODE_SIZE (MODE) <= 8               \
     &&                                                                 \
     (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1),                   \
-     ((GET_CODE (xfoo0) == CONST_INT                                   \
-       && INTVAL (xfoo0) == GET_MODE_SIZE (MODE)                       \
-       && GET_CODE (xfoo1) == REG                                      \
-       && REG_OK_FOR_INDEX_P (xfoo1))                                  \
-      ||                                                               \
-      (GET_CODE (xfoo1) == CONST_INT                                   \
-       && INTVAL (xfoo1) == GET_MODE_SIZE (MODE)                       \
-       && GET_CODE (xfoo0) == REG                                      \
-       && REG_OK_FOR_INDEX_P (xfoo0))))))
+     ((((GET_CODE (xfoo0) == CONST_INT                                 \
+         && GET_CODE (xfoo1) == REG)                                   \
+         && INTVAL (xfoo0) == (int)GET_MODE_SIZE (MODE))               \
+         && REG_OK_FOR_INDEX_P (xfoo1))                                        \
+        ||                                                             \
+      (((GET_CODE (xfoo1) == CONST_INT                                 \
+         && GET_CODE (xfoo0) == REG)                                   \
+         && INTVAL (xfoo1) == (int)GET_MODE_SIZE (MODE))               \
+         && REG_OK_FOR_INDEX_P (xfoo0))))))
 
 /* Go to ADDR if X is the sum of a register
    and a valid index term for mode MODE.  */
@@ -782,7 +746,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    It is always safe for this macro to do nothing.  It exists to recognize
    opportunities to optimize the output.
 
-   For the vax, nothing needs to be done.  */
+   For the VAX, nothing needs to be done.  */
 
 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)  {}
 
@@ -806,22 +770,17 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE HImode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
    Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Define this if the case instruction drops through after the table
    when the index is out of range.  Don't define it if the case insn
    jumps to the default label instead.  */
 #define CASE_DROPS_THROUGH
 
-/* Specify the tree operation to be used to convert reals to integers.  */
-#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
-
-/* This is the kind of divide that is easiest to do in the general case.  */
-#define EASY_DIV_EXPR TRUNC_DIV_EXPR
-
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
 #define DEFAULT_SIGNED_CHAR 1
 
@@ -833,9 +792,6 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    in one reasonably fast instruction.  */
 #define MOVE_MAX 8
 
-/* Define this if zero-extension is slow (more than one real instruction).  */
-/* #define SLOW_ZERO_EXTEND */
-
 /* Nonzero if access to memory by bytes is slow and undesirable.  */
 #define SLOW_BYTE_ACCESS 0
 
@@ -848,6 +804,10 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    is done just by pretending it is already truncated.  */
 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
 
+/* When a prototype says `char' or `short', really pass an `int'.
+   (On the VAX, this is required for system-library compatibility.)  */
+#define PROMOTE_PROTOTYPES 1
+
 /* Specify the machine mode that pointers have.
    After generation of rtl, the compiler makes no further distinction
    between pointers and any other objects of this machine mode.  */
@@ -952,7 +912,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 /* Tell final.c how to eliminate redundant test instructions.  */
 
 /* Here we define machine-dependent flags and fields in cc_status
-   (see `conditions.h').  No extra ones are needed for the vax.  */
+   (see `conditions.h').  No extra ones are needed for the VAX.  */
 
 /* Store in cc_status the expressions
    that the condition codes will describe
@@ -963,8 +923,32 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 { if (GET_CODE (EXP) == SET)                                   \
     { if (GET_CODE (SET_SRC (EXP)) == CALL)                    \
        CC_STATUS_INIT;                                         \
-      else if (GET_CODE (SET_DEST (EXP)) != PC)                        \
-       { cc_status.flags = 0;                                  \
+      else if (GET_CODE (SET_DEST (EXP)) != ZERO_EXTRACT       \
+              && GET_CODE (SET_DEST (EXP)) != PC)              \
+       {                                                       \
+         cc_status.flags = 0;                                  \
+         /* The integer operations below don't set carry or    \
+            set it in an incompatible way.  That's ok though   \
+            as the Z bit is all we need when doing unsigned    \
+            comparisons on the result of these insns (since    \
+            they're always with 0).  Set CC_NO_OVERFLOW to     \
+            generate the correct unsigned branches.  */        \
+         switch (GET_CODE (SET_SRC (EXP)))                     \
+           {                                                   \
+           case NEG:                                           \
+             if (GET_MODE_CLASS (GET_MODE (EXP)) == MODE_FLOAT)\
+               break;                                          \
+           case AND:                                           \
+           case IOR:                                           \
+           case XOR:                                           \
+           case NOT:                                           \
+           case MEM:                                           \
+           case REG:                                           \
+             cc_status.flags = CC_NO_OVERFLOW;                 \
+             break;                                            \
+           default:                                            \
+             break;                                            \
+           }                                                   \
          cc_status.value1 = SET_DEST (EXP);                    \
          cc_status.value2 = SET_SRC (EXP); } }                 \
   else if (GET_CODE (EXP) == PARALLEL                          \
@@ -1000,8 +984,17 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 /* Control the assembler format that we output.  */
 
 /* Output at beginning of assembler file.  */
+/* When debugging, we want to output an extra dummy label so that gas
+   can distinguish between D_float and G_float prior to processing the
+   .stabs directive identifying type double.  */
+
+#define ASM_FILE_START(FILE) \
+  do {                                                         \
+    fputs (ASM_APP_OFF, FILE);                                 \
+    if (write_symbols == DBX_DEBUG)                            \
+      fprintf (FILE, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR); \
+  } while (0)
 
-#define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n");
 
 /* Output to assembler file text saying following lines
    may contain character constants, extra white space, comments, etc.  */
@@ -1015,11 +1008,11 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 
 /* Output before read-only data.  */
 
-#define TEXT_SECTION_ASM_OP ".text"
+#define TEXT_SECTION_ASM_OP "\t.text"
 
 /* Output before writable data.  */
 
-#define DATA_SECTION_ASM_OP ".data"
+#define DATA_SECTION_ASM_OP "\t.data"
 
 /* How to refer to registers in assembler output.
    This sequence is indexed by compiler's hard-register-number (see above).  */
@@ -1032,11 +1025,6 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 
 #define DBX_DEBUGGING_INFO
 
-/* How to renumber registers for dbx and gdb.
-   Vax needs no change in the numeration.  */
-
-#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
-
 /* Do not break .stabs pseudos into continuations.  */
 
 #define DBX_CONTIN_LENGTH 0
@@ -1054,7 +1042,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 /* Output the .stabs for a C `static' variable in the data section.  */
 #define DBX_STATIC_STAB_DATA_SECTION
 
-/* Vax specific: which type character is used for type double?  */
+/* VAX specific: which type character is used for type double?  */
 
 #define ASM_DOUBLE_CHAR (TARGET_G_FLOAT ? 'g' : 'd')
 
@@ -1070,10 +1058,9 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
   do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
 
-/* This is how to output a reference to a user-level label named NAME.  */
+/* The prefix to add to user-visible assembler symbols.  */
 
-#define ASM_OUTPUT_LABELREF(FILE,NAME) \
-  fprintf (FILE, "_%s", NAME)
+#define USER_LABEL_PREFIX "_"
 
 /* This is how to output an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */
@@ -1089,47 +1076,6 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
   sprintf (LABEL, "*%s%d", PREFIX, NUM)
 
-/* This is how to output an assembler line defining a `double' constant.
-   It is .dfloat or .gfloat, depending.  */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE)  \
-do { char dstr[30];                                                    \
-     REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);                     \
-     fprintf (FILE, "\t.%cfloat 0%c%s\n", ASM_DOUBLE_CHAR,             \
-                                         ASM_DOUBLE_CHAR, dstr);       \
-   } while (0);
-
-/* This is how to output an assembler line defining a `float' constant.  */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE)  \
-  do { char dstr[30];                                          \
-       REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);           \
-       fprintf (FILE, "\t.float 0f%s\n", dstr); } while (0);
-
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "\t.long "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t.word "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "\t.byte "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
@@ -1143,7 +1089,7 @@ do { char dstr[30];                                                       \
   fprintf (FILE, "\tmovl (sp)+,%s\n", reg_names[REGNO])
 
 /* This is how to output an element of a case-vector that is absolute.
-   (The Vax does not use such vectors,
+   (The VAX does not use such vectors,
    but we must define this macro anyway.)  */
 
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
@@ -1151,7 +1097,7 @@ do { char dstr[30];                                                       \
 
 /* This is how to output an element of a case-vector that is relative.  */
 
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)  \
   fprintf (FILE, "\t.word L%d-L%d\n", VALUE, REL)
 
 /* This is how to output an assembler line
@@ -1191,31 +1137,20 @@ do { char dstr[30];                                                     \
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),   \
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* When debugging, we want to output an extra dummy label so that gas
-   can distinguish between D_float and G_float prior to processing the
-   .stabs directive identifying type double.  */
-
-#define ASM_IDENTIFY_LANGUAGE(FILE)    \
-  do {                                                         \
-    output_lang_identify (FILE);                               \
-    if (write_symbols == DBX_DEBUG)                            \
-      fprintf (FILE, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR); \
-  } while (0)
-
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
-/* Define results of standard character escape sequences.  */
-#define TARGET_BELL 007
-#define TARGET_BS 010
-#define TARGET_TAB 011
-#define TARGET_NEWLINE 012
-#define TARGET_VT 013
-#define TARGET_FF 014
-#define TARGET_CR 015
+/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
+   Used for C++ multiple inheritance.
+       .mask   ^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>     #conservative entry mask
+       addl2   $DELTA, 4(ap)   #adjust first argument
+       jmp     FUNCTION+2      #jump beyond FUNCTION's entry mask
+ */
+#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
+do {                                           \
+  fprintf (FILE, "\t.word 0x0ffc\n");          \
+  fprintf (FILE, "\taddl2 $%d,4(ap)\n", DELTA);        \
+  fprintf (FILE, "\tjmp ");                    \
+  assemble_name (FILE,  XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
+  fprintf (FILE, "+2\n");                      \
+} while (0)
 
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
@@ -1236,7 +1171,7 @@ VAX operand formatting codes:
    h   the low 16 bits of a negated constant operand
    #   'd' or 'g' depending on whether dfloat or gfloat is used  */
 
-/* The purpose of D is to get around a quirk or bug in vax assembler
+/* The purpose of D is to get around a quirk or bug in VAX assembler
    whereby -1 in a 64-bit immediate operand means 0x00000000ffffffff,
    which is not a 64-bit minus one.  */
 
@@ -1244,8 +1179,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) \