]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/config/fr30/fr30.h
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / config / fr30 / fr30.h
index af277582dbd7f18d9b0fc4b8499a998d4a6ce157..cca71245eb5eb572069606cd3d776e72ed9790b5 100644 (file)
@@ -1,25 +1,25 @@
 /*{{{  Comment.  */ 
 
 /* Definitions of FR30 target. 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2007, 2008
+   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)
+the Free Software Foundation; either version 3, 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 COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 /*}}}*/ \f
 /*{{{  Driver configuration.  */ 
@@ -38,27 +38,15 @@ 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. */
+   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)
-
-#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)");
 
@@ -83,14 +71,8 @@ extern int target_flags;
 
 #define WORDS_BIG_ENDIAN 1
 
-#define BITS_PER_UNIT  8
-
-#define BITS_PER_WORD  32
-
 #define UNITS_PER_WORD         4
 
-#define POINTER_SIZE   32
-
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)      \
   do                                           \
     {                                          \
@@ -122,12 +104,9 @@ extern int target_flags;
 /* Defined in svr4.h.  */
 #define PCC_BITFIELD_TYPE_MATTERS 1
 
-#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
@@ -295,7 +274,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
 };
@@ -303,6 +282,11 @@ enum reg_class
 #define GENERAL_REGS   REAL_REGS
 #define N_REG_CLASSES  ((int) LIM_REG_CLASSES)
 
+#define IRA_COVER_CLASSES                              \
+{                                                      \
+  REAL_REGS, MULTIPLY_64_REG, LIM_REG_CLASSES          \
+}
+
 /* An initializer containing the names of the register classes as C string
    constants.  These names are used in writing some of the debugging dumps.  */
 #define REG_CLASS_NAMES \
@@ -483,8 +467,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 nonzero 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
@@ -555,7 +539,7 @@ enum reg_class
    register.  See `FIXED_REGISTERS' for more information.  */
 /* #define FRAME_POINTER_REQUIRED 0 */
 #define FRAME_POINTER_REQUIRED \
-     (flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0)
+     (flag_omit_frame_pointer == 0 || crtl->args.pretend_args_size > 0)
 
 /* If defined, this macro specifies a table of register pairs used to eliminate
    unneeded registers that point into the stack frame.  If it is not defined,
@@ -587,7 +571,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
@@ -605,15 +589,9 @@ 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
+   `crtl->outgoing_args_size'.  No space will be pushed onto the
    stack for each call; instead, the function prologue should increase the
    stack frame size by this amount.
 
@@ -656,55 +634,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
@@ -719,38 +660,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
@@ -767,7 +677,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
@@ -791,24 +702,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)
 
@@ -824,10 +717,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)
 
@@ -838,17 +731,11 @@ typedef int CUMULATIVE_ARGS;
    in memory.  Since this results in slower code, this should be defined only
    if needed for compatibility with other compilers or with an ABI.  If you
    define this macro to be 0, then the conventions used for structure and union
-   return values are decided by the `RETURN_IN_MEMORY' macro.
+   return values are decided by the `TARGET_RETURN_IN_MEMORY' macro.
 
    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.  */ 
 
@@ -860,7 +747,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)       \
@@ -871,52 +758,6 @@ typedef int CUMULATIVE_ARGS;
   fprintf (FILE, ".word\tLP%d\n", LABELNO);    \
 }
 
-/*}}}*/ \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.  */ 
 
@@ -928,8 +769,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.  */
    
@@ -960,8 +801,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
@@ -984,61 +825,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:
@@ -1047,7 +834,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.  */
    
@@ -1059,13 +846,15 @@ do                                                                               \
         goto LABEL;                                                    \
       if (GET_CODE (X) == PLUS                                         \
          && ((MODE) == SImode || (MODE) == SFmode)                     \
-         && XEXP (X, 0) == stack_pointer_rtx                           \
+         && GET_CODE (XEXP (X, 0)) == REG                              \
+          && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM               \
          && GET_CODE (XEXP (X, 1)) == CONST_INT                        \
          && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 <<  6) - 4))         \
        goto LABEL;                                                     \
       if (GET_CODE (X) == PLUS                                         \
          && ((MODE) == SImode || (MODE) == SFmode)                     \
-         && XEXP (X, 0) == frame_pointer_rtx                           \
+         && GET_CODE (XEXP (X, 0)) == REG                              \
+          && REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM               \
          && GET_CODE (XEXP (X, 1)) == CONST_INT                        \
          && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4)) \
         goto LABEL;                                                    \
@@ -1079,15 +868,16 @@ do                                                                               \
         goto LABEL;                                                    \
       if (GET_CODE (X) == PLUS                                         \
          && ((MODE) == SImode || (MODE) == SFmode)                     \
-         && XEXP (X, 0) == stack_pointer_rtx                           \
+         && GET_CODE (XEXP (X, 0)) == REG                              \
+          && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM               \
          && GET_CODE (XEXP (X, 1)) == CONST_INT                        \
          && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 <<  6) - 4))         \
        goto LABEL;                                                     \
       if (GET_CODE (X) == PLUS                                         \
          && ((MODE) == SImode || (MODE) == SFmode)                     \
-         && GET_CODE (XEXP (X, 0)) == REG                              \
-          && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM              \
-           || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM)               \
+         && 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;                                                    \
@@ -1119,27 +909,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
@@ -1195,7 +964,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.  */
@@ -1220,55 +989,8 @@ do                                                                                \
 /*}}}*/ \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.  */ 
@@ -1300,12 +1022,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
@@ -1328,7 +1046,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)  */
@@ -1341,7 +1059,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) \
@@ -1396,7 +1114,7 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
 #define FUNCTION_MODE QImode
 
 /* If cross-compiling, don't require stdio.h etc to build libgcc.a.  */
-#if defined CROSS_COMPILE && ! defined inhibit_libc
+#if defined CROSS_DIRECTORY_STRUCTURE && ! defined inhibit_libc
 #define inhibit_libc
 #endif
 
@@ -1410,20 +1128,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
 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: */