defaults.h (FRAME_GROWS_DOWNWARD): Define to 0 if not defined.
[platform/upstream/gcc.git] / gcc / config / fr30 / fr30.h
index bc2d0ca..37ed63a 100644 (file)
@@ -1,52 +1,34 @@
 /*{{{  Comment.  */ 
 
 /* Definitions of FR30 target. 
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
+   Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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.  */
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /*}}}*/ \f
 /*{{{  Driver configuration.  */ 
 
-/* A C expression which determines whether the option `-CHAR' takes arguments.
-   The value should be the number of arguments that option takes-zero, for many
-   options.
-
-   By default, this macro is defined to handle the standard options properly.
-   You need not define it unless you wish to add additional options which take
-   arguments.
-
-   Defined in svr4.h.  */
+/* Defined in svr4.h.  */
 #undef SWITCH_TAKES_ARG
 
-/* A C expression which determines whether the option `-NAME' takes arguments.
-   The value should be the number of arguments that option takes-zero, for many
-   options.  This macro rather than `SWITCH_TAKES_ARG' is used for
-   multi-character option names.
-
-   By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which
-   handles the standard options properly.  You need not define
-   `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take
-   arguments.  Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and
-   then check for additional options.
-
-   Defined in svr4.h.  */
+/* Defined in svr4.h.  */
 #undef WORD_SWITCH_TAKES_ARG
 
 /*}}}*/ \f
@@ -57,33 +39,18 @@ Boston, MA 02111-1307, USA.  */
 
 /* Define this to be a string constant containing `-D' options to define the
    predefined macros that identify this machine and system.  These macros will
-   be predefined unless the `-ansi' option is specified. */
-
-#define CPP_PREDEFINES "-Dfr30 -D__fr30__ -Amachine=fr30"
-
-/* Use LDI:20 instead of LDI:32 to load addresses.  */
-#define TARGET_SMALL_MODEL_MASK        (1 << 0)
-#define TARGET_SMALL_MODEL     (target_flags & TARGET_SMALL_MODEL_MASK)
+   be predefined unless the `-ansi' option is specified.  */
 
-#define TARGET_DEFAULT         0
-
-/* This declaration should be present.  */
-extern int target_flags;
-
-#define TARGET_SWITCHES                                                \
-{                                                              \
-  { "small-model",      TARGET_SMALL_MODEL_MASK,               \
-    N_("Assume small address space") },                                \
-  { "no-small-model", - TARGET_SMALL_MODEL_MASK, "" },         \
-  { "no-lsim",          0, "" },                               \
-  { "",                 TARGET_DEFAULT, "" }                   \
-}
+#define TARGET_CPU_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+      builtin_define_std ("fr30");             \
+      builtin_assert ("machine=fr30");         \
+    }                                          \
+   while (0)
 
 #define TARGET_VERSION fprintf (stderr, " (fr30)");
 
-/* Define this macro if debugging can be performed even without a frame
-   pointer.  If this macro is defined, GNU CC will turn on the
-   `-fomit-frame-pointer' option whenever `-O' is specified.  */
 #define CAN_DEBUG_WITHOUT_FP
 
 #undef  STARTFILE_SPEC
@@ -99,61 +66,14 @@ extern int target_flags;
 /*}}}*/ \f
 /*{{{  Storage Layout.  */ 
 
-/* Define this macro to have the value 1 if the most significant bit in a byte
-   has the lowest number; otherwise define it to have the value zero.  This
-   means that bit-field instructions count from the most significant bit.  If
-   the machine has no bit-field instructions, then this must still be defined,
-   but it doesn't matter which value it is defined to.  This macro need not be
-   a constant.
-
-   This macro does not affect the way structure fields are packed into bytes or
-   words; that is controlled by `BYTES_BIG_ENDIAN'.  */
 #define BITS_BIG_ENDIAN 1
 
-/* Define this macro to have the value 1 if the most significant byte in a word
-   has the lowest number.  This macro need not be a constant.  */
 #define BYTES_BIG_ENDIAN 1
 
-/* Define this macro to have the value 1 if, in a multiword object, the most
-   significant word has the lowest number.  This applies to both memory
-   locations and registers; GNU CC fundamentally assumes that the order of
-   words in memory is the same as the order in registers.  This macro need not
-   be a constant.  */
 #define WORDS_BIG_ENDIAN 1
 
-/* Define this macro to be the number of bits in an addressable storage unit
-   (byte); normally 8.  */
-#define BITS_PER_UNIT  8
-
-/* Number of bits in a word; normally 32.  */
-#define BITS_PER_WORD  32
-
-/* Number of storage units in a word; normally 4.  */
 #define UNITS_PER_WORD         4
 
-/* Width of a pointer, in bits.  You must specify a value no wider than the
-   width of `Pmode'.  If it is not equal to the width of `Pmode', you must
-   define `POINTERS_EXTEND_UNSIGNED'.  */
-#define POINTER_SIZE   32
-
-/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and
-   which has the specified mode and signedness is to be stored in a register.
-   This macro is only called when TYPE is a scalar type.
-
-   On most RISC machines, which only have operations that operate on a full
-   register, define this macro to set M to `word_mode' if M is an integer mode
-   narrower than `BITS_PER_WORD'.  In most cases, only integer modes should be
-   widened because wider-precision floating-point operations are usually more
-   expensive than their narrower counterparts.
-
-   For most machines, the macro definition does not change UNSIGNEDP.  However,
-   some machines, have instructions that preferentially handle either signed or
-   unsigned quantities of certain modes.  For example, on the DEC Alpha, 32-bit
-   loads from memory and 32-bit add instructions sign-extend the result to 64
-   bits.  On such machines, set UNSIGNEDP according to which kind of extension
-   is more efficient.
-
-   Do not define this macro if it would never modify MODE.  */
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)      \
   do                                           \
     {                                          \
@@ -163,153 +83,31 @@ extern int target_flags;
     }                                          \
   while (0)
 
-/* Normal alignment required for function parameters on the stack, in bits.
-   All stack parameters receive at least this much alignment regardless of data
-   type.  On most machines, this is the same as the size of an integer.  */
 #define PARM_BOUNDARY 32
 
-/* Define this macro if you wish to preserve a certain alignment for the stack
-   pointer.  The definition is a C expression for the desired alignment
-   (measured in bits).
-
-   If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the
-   specified boundary.  If `PUSH_ROUNDING' is defined and specifies a less
-   strict alignment than `STACK_BOUNDARY', the stack may be momentarily
-   unaligned while pushing arguments.  */
 #define STACK_BOUNDARY 32
 
-/* Alignment required for a function entry point, in bits.  */
 #define FUNCTION_BOUNDARY 32
 
-/* Biggest alignment that any data type can require on this machine,
-   in bits.  */
 #define BIGGEST_ALIGNMENT 32
 
-/* If defined, a C expression to compute the alignment for a static variable.
-   TYPE is the data type, and ALIGN is the alignment that the object
-   would ordinarily have.  The value of this macro is used instead of that
-   alignment to align the object.
-
-   If this macro is not defined, then ALIGN is used.
-
-   One use of this macro is to increase alignment of medium-size data to make
-   it all fit in fewer cache lines.  Another is to cause character arrays to be
-   word-aligned so that `strcpy' calls that copy constants to character arrays
-   can be done inline.  */
 #define DATA_ALIGNMENT(TYPE, ALIGN)            \
   (TREE_CODE (TYPE) == ARRAY_TYPE              \
    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode   \
    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
 
-/* If defined, a C expression to compute the alignment given to a constant that
-   is being placed in memory.  CONSTANT is the constant and ALIGN is the
-   alignment that the object would ordinarily have.  The value of this macro is
-   used instead of that alignment to align the object.
-
-   If this macro is not defined, then ALIGN is used.
-
-   The typical use of this macro is to increase alignment for string constants
-   to be word aligned so that `strcpy' calls that copy constants can be done
-   inline.  */
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)  \
   (TREE_CODE (EXP) == STRING_CST       \
    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
 
-/* Define this macro to be the value 1 if instructions will fail to work if
-   given data not on the nominal alignment.  If instructions will merely go
-   slower in that case, define this macro as 0.  */
 #define STRICT_ALIGNMENT 1
 
-/* Define this if you wish to imitate the way many other C compilers handle
-   alignment of bitfields and the structures that contain them.
-
-   The behavior is that the type written for a bitfield (`int', `short', or
-   other integer type) imposes an alignment for the entire structure, as if the
-   structure really did contain an ordinary field of that type.  In addition,
-   the bitfield is placed within the structure so that it would fit within such
-   a field, not crossing a boundary for it.
-
-   Thus, on most machines, a bitfield whose type is written as `int' would not
-   cross a four-byte boundary, and would force four-byte alignment for the
-   whole structure.  (The alignment used may not be four bytes; it is
-   controlled by the other alignment parameters.)
-
-   If the macro is defined, its definition should be a C expression; a nonzero
-   value for the expression enables this behavior.
-
-   Note that if this macro is not defined, or its value is zero, some bitfields
-   may cross more than one alignment boundary.  The compiler can support such
-   references if there are `insv', `extv', and `extzv' insns that can directly
-   reference memory.
-
-   The other known way of making bitfields work is to define
-   `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'.  Then every
-   structure can be accessed with fullwords.
-
-   Unless the machine has bitfield instructions or you define
-   `STRUCTURE_SIZE_BOUNDARY' that way, you must define
-   `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
-
-   If your aim is to make GNU CC use the same conventions for laying out
-   bitfields as are used by another compiler, here is how to investigate what
-   the other compiler does.  Compile and run this program:
-
-        struct foo1
-        {
-          char x;
-          char :0;
-          char y;
-        };
-
-        struct foo2
-        {
-          char x;
-          int :0;
-          char y;
-        };
-
-        main ()
-        {
-          printf ("Size of foo1 is %d\n",
-                  sizeof (struct foo1));
-          printf ("Size of foo2 is %d\n",
-                  sizeof (struct foo2));
-          exit (0);
-        }
-
-   If this prints 2 and 5, then the compiler's behavior is what you would get
-   from `PCC_BITFIELD_TYPE_MATTERS'.
-
-   Defined in svr4.h.  */
+/* Defined in svr4.h.  */
 #define PCC_BITFIELD_TYPE_MATTERS 1
 
-/* A code distinguishing the floating point format of the target machine.
-   There are three defined values:
-
-   IEEE_FLOAT_FORMAT'
-        This code indicates IEEE floating point.  It is the default;
-        there is no need to define this macro when the format is IEEE.
-
-   VAX_FLOAT_FORMAT'
-        This code indicates the peculiar format used on the VAX.
-
-   UNKNOWN_FLOAT_FORMAT'
-        This code indicates any other format.
-
-   The value of this macro is compared with `HOST_FLOAT_FORMAT'
-   to determine whether the target machine has the same format as
-   the host machine.  If any other formats are actually in use on supported
-   machines, new codes should be defined for them.
-
-   The ordering of the component words of floating point values stored in
-   memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the target machine and
-   `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host.  */
-#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
-
 /*}}}*/ \f
 /*{{{  Layout of Source Language Data Types.  */ 
 
-#define CHAR_TYPE_SIZE                  8
 #define SHORT_TYPE_SIZE        16
 #define INT_TYPE_SIZE          32
 #define LONG_TYPE_SIZE                 32
@@ -318,9 +116,6 @@ extern int target_flags;
 #define DOUBLE_TYPE_SIZE       64
 #define LONG_DOUBLE_TYPE_SIZE  64
 
-/* An expression whose value is 1 or 0, according to whether the type `char'
-   should be signed or unsigned by default.  The user can always override this
-   default with the options `-fsigned-char' and `-funsigned-char'.  */
 #define DEFAULT_SIGNED_CHAR 1
 
 /*}}}*/ \f
@@ -480,7 +275,7 @@ enum reg_class
   MULTIPLY_64_REG,     /* the MDH,MDL register pair as used by MUL and MULU */
   LOW_REGS,            /* registers 0 through 7 */
   HIGH_REGS,           /* registers 8 through 15 */
-  REAL_REGS,           /* ie all the general hardware registers on the FR30 */
+  REAL_REGS,           /* i.e. all the general hardware registers on the FR30 */
   ALL_REGS,
   LIM_REG_CLASSES
 };
@@ -668,8 +463,8 @@ enum reg_class
    to a smaller address.  */
 #define STACK_GROWS_DOWNWARD 1
 
-/* Define this macro if the addresses of local variable slots are at negative
-   offsets from the frame pointer.  */
+/* Define this to macro non-zero if the addresses of local variable slots
+   are at negative offsets from the frame pointer.  */
 #define FRAME_GROWS_DOWNWARD 1
 
 /* Offset from the frame pointer to the first local variable slot to be
@@ -772,7 +567,7 @@ enum reg_class
   {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
 }
 
-/* A C expression that returns non-zero if the compiler is allowed to try to
+/* A C expression that returns nonzero if the compiler is allowed to try to
    replace register number FROM with register number TO.  This macro
    need only be defined if `ELIMINABLE_REGS' is defined, and will usually be
    the constant 1, since most of the cases preventing register elimination are
@@ -790,12 +585,6 @@ enum reg_class
 /*}}}*/ \f
 /*{{{  Passing Function Arguments on the Stack.  */ 
 
-/* Define this macro if an argument declared in a prototype as an integral type
-   smaller than `int' should actually be passed as an `int'.  In addition to
-   avoiding errors in certain cases of mismatch, it also makes for better code
-   on certain machines.  */
-#define PROMOTE_PROTOTYPES 1
-
 /* If defined, the maximum amount of space required for outgoing arguments will
    be computed and placed into the variable
    `current_function_outgoing_args_size'.  No space will be pushed onto the
@@ -841,55 +630,18 @@ enum reg_class
    takes a fixed number of arguments.  */
 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
 
-/* Implement `va_arg'.  */
-#define EXPAND_BUILTIN_VA_ARG(valist, type) \
-  fr30_va_arg (valist, type)
-
 /*}}}*/ \f
 /*{{{  Function Arguments in Registers.  */ 
 
-/* Nonzero if we do not know how to pass TYPE solely in registers.
-   We cannot do so in the following cases:
-
-   - if the type has variable size
-   - if the type is marked as addressable (it is required to be constructed
-     into the stack)
-   - if the type is a structure or union. */
-
-#define MUST_PASS_IN_STACK(MODE, TYPE)                         \
-   (((MODE) == BLKmode)                                                \
-    || ((TYPE) != NULL                                         \
-         && TYPE_SIZE (TYPE) != NULL                           \
-         && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST       \
-            || TREE_CODE (TYPE) == RECORD_TYPE                 \
-            || TREE_CODE (TYPE) == UNION_TYPE                  \
-            || TREE_CODE (TYPE) == QUAL_UNION_TYPE             \
-             || TREE_ADDRESSABLE (TYPE))))
-
 /* The number of register assigned to holding function arguments.  */
      
 #define FR30_NUM_ARG_REGS       4
 
-/* A C expression that controls whether a function argument is passed in a
-   register, and which register.
-
-   The usual way to make the ANSI library `stdarg.h' work on a machine where
-   some arguments are usually passed in registers, is to cause nameless
-   arguments to be passed on the stack instead.  This is done by making
-   `FUNCTION_ARG' return 0 whenever NAMED is 0.
-
-   You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of
-   this macro to determine if this argument is of a type that must be passed in
-   the stack.  If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG'
-   returns non-zero for such an argument, the compiler will abort.  If
-   `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the
-   stack and then loaded into a register.  */
-     
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)                   \
   (  (NAMED) == 0                    ? NULL_RTX                        \
-   : MUST_PASS_IN_STACK (MODE, TYPE) ? NULL_RTX                        \
+   : targetm.calls.must_pass_in_stack (MODE, TYPE) ? NULL_RTX  \
    : (CUM) >= FR30_NUM_ARG_REGS      ? NULL_RTX                        \
-   : gen_rtx (REG, MODE, CUM + FIRST_ARG_REGNUM))
+   : gen_rtx_REG (MODE, CUM + FIRST_ARG_REGNUM))
 
 /* A C type for declaring a variable that is used as the first argument of
    `FUNCTION_ARG' and other related values.  For some target machines, the type
@@ -904,38 +656,7 @@ enum reg_class
 /* On the FR30 this value is an accumulating count of the number of argument
    registers that have been filled with argument values, as opposed to say,
    the number of bytes of argument accumulated so far.  */
-typedef int CUMULATIVE_ARGS;
-
-/* A C expression for the number of words, at the beginning of an argument,
-   must be put in registers.  The value must be zero for arguments that are
-   passed entirely in registers or that are entirely pushed on the stack.
-
-   On some machines, certain arguments must be passed partially in registers
-   and partially in memory.  On these machines, typically the first N words of
-   arguments are passed in registers, and the rest on the stack.  If a
-   multi-word argument (a `double' or a structure) crosses that boundary, its
-   first few words must be passed in registers and the rest must be pushed.
-   This macro tells the compiler when this occurs, and how many of the words
-   should go in registers.
-
-   `FUNCTION_ARG' for these arguments should return the first register to be
-   used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for
-   the called function.  */
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED)     \
-  fr30_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED)
-
-/* A C expression that indicates when an argument must be passed by reference.
-   If nonzero for an argument, a copy of that argument is made in memory and a
-   pointer to the argument is passed instead of the argument itself.  The
-   pointer is passed in whatever way is appropriate for passing a pointer to
-   that type.
-
-   On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable
-   definition of this macro might be:
-        #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED)  \
-          MUST_PASS_IN_STACK (MODE, TYPE)  */
-#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
-  MUST_PASS_IN_STACK (MODE, TYPE)
+#define CUMULATIVE_ARGS int
 
 /* A C statement (sans semicolon) for initializing the variable CUM for the
    state at the beginning of the argument list.  The variable has type
@@ -952,7 +673,8 @@ typedef int CUMULATIVE_ARGS;
    the function, as a string.  LIBNAME is 0 when an ordinary C function call is
    being processed.  Thus, each time this macro is called, either LIBNAME or
    FNTYPE is nonzero, but never both of them at once.  */
-#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) (CUM) = 0
+#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
+  (CUM) = 0
 
 /* A C statement (sans semicolon) to update the summarizer variable CUM to
    advance past an argument in the argument list.  The values MODE, TYPE and
@@ -976,24 +698,6 @@ typedef int CUMULATIVE_ARGS;
 /*}}}*/ \f
 /*{{{  How Scalar Function Values are Returned.  */ 
 
-/* A C expression to create an RTX representing the place where a function
-   returns a value of data type VALTYPE.  VALTYPE is a tree node representing a
-   data type.  Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
-   represent that type.  On many machines, only the mode is relevant.
-   (Actually, on most machines, scalar values are returned in the same place
-   regardless of mode).
-
-   If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion
-   rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type.
-
-   If the precise function being called is known, FUNC is a tree node
-   (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer.  This makes it
-   possible to use a different value-returning convention for specific
-   functions when all their calls are known.
-
-   `FUNCTION_VALUE' is not used for return vales with aggregate data types,
-   because these are returned in another way.  See `STRUCT_VALUE_REGNUM' and
-   related macros, below.  */
 #define FUNCTION_VALUE(VALTYPE, FUNC) \
      gen_rtx_REG (TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM)
 
@@ -1009,10 +713,10 @@ typedef int CUMULATIVE_ARGS;
 
    The definition of `LIBRARY_VALUE' need not be concerned aggregate data
    types, because none of the library functions returns such types.  */
-#define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RETURN_VALUE_REGNUM)
+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RETURN_VALUE_REGNUM)
 
 /* A C expression that is nonzero if REGNO is the number of a hard register in
-   which the values of called function may come back. */
+   which the values of called function may come back.  */
 
 #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM)
 
@@ -1028,12 +732,6 @@ typedef int CUMULATIVE_ARGS;
    If not defined, this defaults to the value 1.  */
 #define DEFAULT_PCC_STRUCT_RETURN 1
 
-/* If the structure value address is not passed in a register, define
-   `STRUCT_VALUE' as an expression returning an RTX for the place where the
-   address is passed.  If it returns 0, the address is passed as an "invisible"
-   first argument.  */
-#define STRUCT_VALUE 0
-
 /*}}}*/ \f
 /*{{{  Generating Code for Profiling.  */ 
 
@@ -1045,7 +743,7 @@ typedef int CUMULATIVE_ARGS;
    `fprintf'.
 
    The details of how the address should be passed to `mcount' are determined
-   by your operating system environment, not by GNU CC.  To figure them out,
+   by your operating system environment, not by GCC.  To figure them out,
    compile a small program for profiling using the system's installed C
    compiler and look at the assembler code that results.  */
 #define FUNCTION_PROFILER(FILE, LABELNO)       \
@@ -1057,52 +755,6 @@ typedef int CUMULATIVE_ARGS;
 }
 
 /*}}}*/ \f
-/*{{{  Implementing the VARARGS Macros.  */ 
-
-/* This macro offers an alternative to using `__builtin_saveregs' and defining
-   the macro `EXPAND_BUILTIN_SAVEREGS'.  Use it to store the anonymous register
-   arguments into the stack so that all the arguments appear to have been
-   passed consecutively on the stack.  Once this is done, you can use the
-   standard implementation of varargs that works for machines that pass all
-   their arguments on the stack.
-
-   The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing
-   the values that obtain after processing of the named arguments.  The
-   arguments MODE and TYPE describe the last named argument--its machine mode
-   and its data type as a tree node.
-
-   The macro implementation should do two things: first, push onto the stack
-   all the argument registers *not* used for the named arguments, and second,
-   store the size of the data thus pushed into the `int'-valued variable whose
-   name is supplied as the argument PRETEND_ARGS_SIZE.  The value that you
-   store here will serve as additional offset for setting up the stack frame.
-
-   Because you must generate code to push the anonymous arguments at compile
-   time without knowing their data types, `SETUP_INCOMING_VARARGS' is only
-   useful on machines that have just a single category of argument register and
-   use it uniformly for all data types.
-
-   If the argument SECOND_TIME is nonzero, it means that the arguments of the
-   function are being analyzed for the second time.  This happens for an inline
-   function, which is not actually compiled until the end of the source file.
-   The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in
-   this case.  */
-#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
-  if (! SECOND_TIME) \
-    fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
-
-/* Define this macro if the location where a function argument is passed
-   depends on whether or not it is a named argument.
-
-   This macro controls how the NAMED argument to `FUNCTION_ARG' is set for
-   varargs and stdarg functions.  With this macro defined, the NAMED argument
-   is always true for named arguments, and false for unnamed arguments.  If
-   this is not defined, but `SETUP_INCOMING_VARARGS' is defined, then all
-   arguments are treated as named.  Otherwise, all named arguments except the
-   last are treated as named.  */
-#define STRICT_ARGUMENT_NAMING 0
-
-/*}}}*/ \f
 /*{{{  Trampolines for Nested Functions.  */ 
 
 /* On the FR30, the trampoline is:
@@ -1113,8 +765,8 @@ typedef int CUMULATIVE_ARGS;
    ldi:32 FUNCTION, r0
    jmp    @r0
 
-   The no-ops are to guarantee that the the static chain and final
-   target are 32 bit ailgned within the trampoline.  That allows us to
+   The no-ops are to guarantee that the static chain and final
+   target are 32 bit aligned within the trampoline.  That allows us to
    initialize those locations with simple SImode stores.   The alternative
    would be to use HImode stores.  */
    
@@ -1145,8 +797,8 @@ typedef int CUMULATIVE_ARGS;
 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN)                      \
 do                                                                             \
 {                                                                              \
-  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\
-  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 12)), FNADDR);    \
+  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\
+  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (ADDR, 12)), FNADDR);     \
 } while (0);
 
 /*}}}*/ \f
@@ -1169,61 +821,7 @@ do                                                                                \
 
 /* A C compound statement with a conditional `goto LABEL;' executed if X (an
    RTX) is a legitimate memory address on the target machine for a memory
-   operand of mode MODE.
-
-   It usually pays to define several simpler macros to serve as subroutines for
-   this one.  Otherwise it may be too complicated to understand.
-
-   This macro must exist in two variants: a strict variant and a non-strict
-   one.  The strict variant is used in the reload pass.  It must be defined so
-   that any pseudo-register that has not been allocated a hard register is
-   considered a memory reference.  In contexts where some kind of register is
-   required, a pseudo-register with no hard register must be rejected.
-
-   The non-strict variant is used in other passes.  It must be defined to
-   accept all pseudo-registers in every context where some kind of register is
-   required.
-
-   Compiler source files that want to use the strict variant of this macro
-   define the macro `REG_OK_STRICT'.  You should use an `#ifdef REG_OK_STRICT'
-   conditional to define the strict variant in that case and the non-strict
-   variant otherwise.
-
-   Subroutines to check for acceptable registers for various purposes (one for
-   base registers, one for index registers, and so on) are typically among the
-   subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'.  Then only these
-   subroutine macros need have two variants; the higher levels of macros may be
-   the same whether strict or not.
-
-   Normally, constant addresses which are the sum of a `symbol_ref' and an
-   integer are stored inside a `const' RTX to mark them as constant.
-   Therefore, there is no need to recognize such sums specifically as
-   legitimate addresses.  Normally you would simply recognize any `const' as
-   legitimate.
-
-   Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
-   are not marked with `const'.  It assumes that a naked `plus' indicates
-   indexing.  If so, then you *must* reject such naked constant sums as
-   illegitimate addresses, so that none of them will be given to
-   `PRINT_OPERAND_ADDRESS'.
-
-   On some machines, whether a symbolic address is legitimate depends on the
-   section that the address refers to.  On these machines, define the macro
-   `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
-   then check for it here.  When you see a `const', you will have to look
-   inside it to find the `symbol_ref' in order to determine the section.
-
-   The best way to modify the name string is by adding text to the beginning,
-   with suitable punctuation to prevent any ambiguity.  Allocate the new name
-   in `saveable_obstack'.  You will have to modify `ASM_OUTPUT_LABELREF' to
-   remove and decode the added text and output the name accordingly, and define
-   `STRIP_NAME_ENCODING' to access the original name string.
-
-   You can check the information stored here into the `symbol_ref' in the
-   definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
-   `PRINT_OPERAND_ADDRESS'.
-
-   Used in explow.c, recog.c, reload.c.  */
+   operand of mode MODE.  */
 
 /* On the FR30 we only have one real addressing mode - an address in a
    register.  There are three special cases however:
@@ -1232,7 +830,7 @@ do                                                                         \
    
    * indexed addressing using small signed offsets from the frame pointer
 
-   * register plus register addresing using R13 as the base register.
+   * register plus register addressing using R13 as the base register.
 
    At the moment we only support the first two of these special cases.  */
    
@@ -1270,8 +868,9 @@ do                                                                         \
        goto LABEL;                                                     \
       if (GET_CODE (X) == PLUS                                         \
          && ((MODE) == SImode || (MODE) == SFmode)                     \
-         && (XEXP (X, 0) == frame_pointer_rtx                          \
-             || XEXP(X,0) == arg_pointer_rtx)                          \
+         && GET_CODE (XEXP (X, 0)) == REG \
+          && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \
+           || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \
          && GET_CODE (XEXP (X, 1)) == CONST_INT                        \
          && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4)) \
         goto LABEL;                                                    \
@@ -1303,27 +902,6 @@ do                                                                                \
    will reload one or both registers only if neither labeling works.  */
 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
 
-/* A C compound statement that attempts to replace X with a valid memory
-   address for an operand of mode MODE.  WIN will be a C statement label
-   elsewhere in the code; the macro definition may use
-
-        GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
-
-   to avoid further processing if the address has become legitimate.
-
-   X will always be the result of a call to `break_out_memory_refs', and OLDX
-   will be the operand that was given to that function to produce X.
-
-   The code generated by this macro should not alter the substructure of X.  If
-   it transforms X into a more legitimate form, it should assign X (which will
-   always be a C variable) a new value.
-
-   It is not necessary for this macro to come up with a legitimate address.
-   The compiler has standard ways of doing so in all cases.  In fact, it is
-   safe for this macro to do nothing.  But often a machine-dependent strategy
-   can generate better code.  */
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
 /* A C statement or compound statement with a conditional `goto LABEL;'
    executed if memory address X (an RTX) can have different meanings depending
    on the machine mode of the memory reference it is used for or if the address
@@ -1359,17 +937,6 @@ do                                                                                \
    same word of the structure, but to different bytes.  */
 #define SLOW_BYTE_ACCESS 1
 
-/* Define this macro if zero-extension (of a `char' or `short' to an `int') can
-   be done faster if the destination is a register that is known to be zero.
-
-   If you define this macro, you must have instruction patterns that recognize
-   RTL structures like this:
-
-        (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...)
-
-   and likewise for `HImode'.  */
-#define SLOW_ZERO_EXTEND 0
-
 /*}}}*/ \f
 /*{{{  Dividing the output into sections.  */ 
 
@@ -1390,7 +957,7 @@ do                                                                         \
    uninitialized global data will be output in the data section if
    `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
    used.  */
-#define BSS_SECTION_ASM_OP "\t.bss"
+#define BSS_SECTION_ASM_OP "\t.section .bss"
 
 /*}}}*/ \f
 /*{{{  The Overall Framework of an Assembler File.  */
@@ -1413,126 +980,10 @@ do                                                                              \
 #define ASM_APP_OFF "#NO_APP\n"
 
 /*}}}*/ \f
-/*{{{  Output of Data.  */
-
-/* This is how to output an assembler line defining a `float' constant.  */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE)                  \
-  do                                                   \
-    {                                                  \
-      long t;                                          \
-      char str[30];                                    \
-                                                       \
-      REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t);                \
-      REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);   \
-                                                       \
-      fprintf (FILE, "\t.word\t0x%lx %s %s\n",         \
-              t, ASM_COMMENT_START, str);              \
-    }                                                  \
-  while (0)
-
-/* This is how to output an assembler line defining a `double' constant.  */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE)                         \
-  do                                                           \
-    {                                                          \
-      long t[2];                                               \
-      char str[30];                                            \
-                                                               \
-      REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t);                        \
-      REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);           \
-                                                               \
-      fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \
-              t[0], ASM_COMMENT_START, str, t[1]);             \
-    }                                                          \
-  while (0)
-
-/* This is how to output an assembler line defining a `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE, VALUE)           \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.byte\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining a `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE, VALUE)          \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.hword\t");            \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  */
-#define ASM_OUTPUT_INT(FILE, VALUE)            \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.word\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble a single byte containing the number VALUE.  */
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
-  fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
-
-/*}}}*/ \f
 /*{{{  Output and Generation of Labels.  */ 
 
-/* A C statement (sans semicolon) to output to the stdio stream STREAM the
-   assembler definition of a label named NAME.  Use the expression
-   `assemble_name (STREAM, NAME)' to output the name itself; before and after
-   that, output the additional assembler syntax for defining the name, and a
-   newline.  */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
-  do                                   \
-    {                                  \
-      assemble_name (STREAM, NAME);    \
-      fputs (":\n", STREAM);           \
-    }                                  \
-  while (0)
-
-/* A C statement (sans semicolon) to output to the stdio stream STREAM some
-   commands that will make the label NAME global; that is, available for
-   reference from other files.  Use the expression `assemble_name (STREAM,
-   NAME)' to output the name itself; before and after that, output the
-   additional assembler syntax for making that name global, and a newline.  */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME)       \
-  do                                           \
-    {                                          \
-      fputs ("\t.globl ", STREAM);             \
-      assemble_name (STREAM, NAME);            \
-      fputs ("\n", STREAM);                    \
-    }                                          \
-  while (0)
-
-/* A C expression to assign to OUTVAR (which is a variable of type `char *') a
-   newly allocated string made from the string NAME and the number NUMBER, with
-   some suitable punctuation added.  Use `alloca' to get space for the string.
-
-   The string will be used as an argument to `ASM_OUTPUT_LABELREF' to produce
-   an assembler label for an internal static variable whose name is NAME.
-   Therefore, the string must be such as to result in valid assembler code.
-   The argument NUMBER is different each time this macro is executed; it
-   prevents conflicts between similarly-named internal static variables in
-   different scopes.
-
-   Ideally this string should not be a valid C identifier, to prevent any
-   conflict with the user's own symbols.  Most assemblers allow periods or
-   percent signs in assembler symbols; putting at least one of these between
-   the name and the number will suffice.  */
-#define ASM_FORMAT_PRIVATE_NAME(OUTVAR, NAME, NUMBER)          \
-  do                                                           \
-    {                                                          \
-      (OUTVAR) = (char *) alloca (strlen ((NAME)) + 12);       \
-      sprintf ((OUTVAR), "%s.%ld", (NAME), (long)(NUMBER));    \
-    }                                                          \
-  while (0)
+/* Globalizing directive for a label.  */
+#define GLOBAL_ASM_OP "\t.globl "
 
 /*}}}*/ \f
 /*{{{  Output of Assembler Instructions.  */ 
@@ -1564,12 +1015,8 @@ do                                                                               \
 
 /* A C compound statement to output to stdio stream STREAM the assembler syntax
    for an instruction operand that is a memory reference whose address is X.  X
-   is an RTL expression.
+   is an RTL expression.  */
 
-   On some machines, the syntax for a symbolic address depends on the section
-   that the address refers to.  On these machines, define the macro
-   `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
-   then check for it here.  *Note Assembler Format::.  */
 #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X)
 
 /* If defined, C string expressions to be used for the `%R', `%L', `%U', and
@@ -1592,7 +1039,7 @@ do                                                                                \
    The definition should be a C statement to output to the stdio stream STREAM
    an assembler pseudo-instruction to generate a difference between two labels.
    VALUE and REL are the numbers of two internal labels.  The definitions of
-   these labels are output using `ASM_OUTPUT_INTERNAL_LABEL', and they must be
+   these labels are output using `(*targetm.asm_out.internal_label)', and they must be
    printed in the same way here.  For example,
 
         fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL)  */
@@ -1605,7 +1052,7 @@ fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL)
    The definition should be a C statement to output to the stdio stream STREAM
    an assembler pseudo-instruction to generate a reference to a label.  VALUE
    is the number of an internal label whose definition is output using
-   `ASM_OUTPUT_INTERNAL_LABEL'.  For example,
+   `(*targetm.asm_out.internal_label)'.  For example,
 
         fprintf (STREAM, "\t.word L%d\n", VALUE)  */
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
@@ -1621,50 +1068,12 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
   fprintf ((STREAM), "\t.p2align %d\n", (POWER))
 
 /*}}}*/ \f
-/*{{{  Macros Affecting all Debug Formats.  */ 
-
-/* A C expression that returns the DBX register number for the compiler
-   register number REGNO.  In simple cases, the value of this expression may be
-   REGNO itself.  But sometimes there are some registers that the compiler
-   knows about and DBX does not, or vice versa.  In such cases, some register
-   may need to have one number in the compiler and another for DBX.
-
-   If two registers have consecutive numbers inside GNU CC, and they can be
-   used as a pair to hold a multiword value, then they *must* have consecutive
-   numbers after renumbering with `DBX_REGISTER_NUMBER'.  Otherwise, debuggers
-   will be unable to access such a pair, because they expect register pairs to
-   be consecutive in their own numbering scheme.
-
-   If you find yourself defining `DBX_REGISTER_NUMBER' in way that does not
-   preserve register pairs, then what you must do instead is redefine the
-   actual register numbering scheme.  */
-#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
-
-/*}}}*/ \f
-/*{{{  Macros for SDB and Dwarf Output.  */ 
-
-/* Define this macro to allow references to structure, union, or enumeration
-   tags that have not yet been seen to be handled.  Some assemblers choke if
-   forward tags are used, while some require it.  */
-/* #define SDB_ALLOW_FORWARD_REFERENCES */
-
-#define DWARF_LINE_MIN_INSTR_LENGTH 2
-     
-/*}}}*/ \f
 /*{{{  Miscellaneous Parameters.  */ 
 
 /* An alias for a machine mode name.  This is the machine mode that elements of
    a jump-table should have.  */
 #define CASE_VECTOR_MODE SImode
 
-/* An alias for a tree code that is the easiest kind of division to compile
-   code for in the general case.  It may be `TRUNC_DIV_EXPR', `FLOOR_DIV_EXPR',
-   `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four division operators differ
-   in how they round the result to an integer.  `EASY_DIV_EXPR' is used when it
-   is permissible to use any of those kinds of division and the choice should
-   be made on the basis of efficiency.  */
-#define EASY_DIV_EXPR TRUNC_DIV_EXPR
-
 /* The maximum number of bytes that a single instruction can move quickly from
    memory to memory.  */
 #define MOVE_MAX 8
@@ -1713,20 +1122,6 @@ extern struct rtx_def * fr30_compare_op0;
 extern struct rtx_def * fr30_compare_op1;
 
 /*}}}*/ \f
-/*{{{  PERDICATE_CODES.  */ 
-
-#define PREDICATE_CODES                                        \
-  { "stack_add_operand",       { CONST_INT }},         \
-  { "high_register_operand",   { REG }},               \
-  { "low_register_operand",    { REG }},               \
-  { "call_operand",            { MEM }},               \
-  { "fp_displacement_operand", { CONST_INT }},         \
-  { "sp_displacement_operand", { CONST_INT }},         \
-  { "di_operand",              { CONST_INT, CONST_DOUBLE, REG, MEM }}, \
-  { "nonimmediate_di_operand", { REG, MEM }},          \
-  { "add_immediate_operand",   { REG, CONST_INT }},
-
-/*}}}*/ \f
 
 /* Local Variables: */
 /* folded-file: t   */