OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / config / m32r / m32r.h
index 14f266c..a645518 100644 (file)
@@ -1,12 +1,12 @@
 /* Definitions of target machine for GNU compiler, Renesas M32R cpu.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
    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
+   by the Free Software Foundation; either version 3, or (at your
    option) any later version.
 
    GCC is distributed in the hope that it will be useful, but WITHOUT
@@ -15,9 +15,8 @@
    License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GCC; 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/>.  */
 
 /* Things to do:
 - longlong.h?
@@ -36,7 +35,6 @@
 #undef LINK_SPEC
 #undef STARTFILE_SPEC
 #undef ENDFILE_SPEC
-#undef SUBTARGET_SWITCHES
 
 #undef ASM_APP_ON
 #undef ASM_APP_OFF
 #define STARTFILE_CPU_SPEC "%{!shared:crt0.o%s} %{m32rx:m32rx/crtinit.o%s} %{!m32rx:crtinit.o%s}"
 #define ENDFILE_CPU_SPEC "-lgloss %{m32rx:m32rx/crtfini.o%s} %{!m32rx:crtfini.o%s}"
 
-/* Extra machine dependent switches.  */
-#define SUBTARGET_SWITCHES                                                     \
-    { "32rx",                  TARGET_M32RX_MASK, "Compile for the m32rx" },   \
-    { "32r2",                  TARGET_M32R2_MASK, "Compile for the m32r2" },   \
-    { "32r",                   -(TARGET_M32RX_MASK+TARGET_M32R2_MASK), "" },
-
 /* Define this macro as a C expression for the initializer of an array of
    strings to tell the driver program which options are defaults for this
    target and thus do not need to be handled specially when using
       builtin_assert ("machine=m32r");         \
       builtin_define (TARGET_BIG_ENDIAN                \
                       ? "__BIG_ENDIAN__" : "__LITTLE_ENDIAN__"); \
-      if (flag_pic)                            \
-        {                                      \
-          builtin_define ("__pic__");          \
-          builtin_define ("__PIC__");          \
-        }                                      \
     }                                          \
   while (0)
 
 
 /* Options to pass on to the assembler.  */
 #undef  ASM_SPEC
-#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic:-K PIC} %{fPIC:-K PIC}"
+#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
 
 #define LINK_SPEC "%{v} %(link_cpu) %(relax)"
 
 \f
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
-extern int target_flags;
-
-/* If nonzero, tell the linker to do relaxing.
-   We don't do anything with the option, other than recognize it.
-   LINK_SPEC handles passing -relax to the linker.
-   This can cause incorrect debugging information as line numbers may
-   turn out wrong.  This shouldn't be specified unless accompanied with -O2
-   [where the user expects debugging information to be less accurate].  */
-#define TARGET_RELAX_MASK      (1 << 0)
-
-/* For miscellaneous debugging purposes.  */
-#define TARGET_DEBUG_MASK      (1 << 1)
-#define TARGET_DEBUG           (target_flags & TARGET_DEBUG_MASK)
-
-/* Align loops to 32 byte boundaries (cache line size).  */
-/* ??? This option is experimental and is not documented.  */
-#define TARGET_ALIGN_LOOPS_MASK (1 << 2)
-#define TARGET_ALIGN_LOOPS     (target_flags & TARGET_ALIGN_LOOPS_MASK)
-
-/* Change issue rate.  */
-#define TARGET_LOW_ISSUE_RATE_MASK     (1 << 3)
-#define TARGET_LOW_ISSUE_RATE  (target_flags & TARGET_LOW_ISSUE_RATE_MASK)
-
-/* Change branch cost */
-#define TARGET_BRANCH_COST_MASK        (1 << 4)
-#define TARGET_BRANCH_COST     (target_flags & TARGET_BRANCH_COST_MASK)
-
-/* Target machine to compile for.  */
-#define TARGET_M32R            1
-
-/* Support extended instruction set.  */
-#define TARGET_M32RX_MASK       (1 << 5)
-#define TARGET_M32RX            (target_flags & TARGET_M32RX_MASK)
-#undef  TARGET_M32R
-#define TARGET_M32R             (! TARGET_M32RX)
-
-/* Support extended instruction set of m32r2.  */
-#define TARGET_M32R2_MASK       (1 << 6)
-#define TARGET_M32R2            (target_flags & TARGET_M32R2_MASK)
-#undef  TARGET_M32R
 #define TARGET_M32R             (! TARGET_M32RX && ! TARGET_M32R2)
 
-/* Little Endian Flag.  */
-#define LITTLE_ENDIAN_BIT      (1 << 7)
-#define TARGET_LITTLE_ENDIAN   (target_flags & LITTLE_ENDIAN_BIT)
-#define TARGET_BIG_ENDIAN       (! TARGET_LITTLE_ENDIAN)
-
-/* This defaults us to big-endian.  */
-#ifndef TARGET_ENDIAN_DEFAULT
-#define TARGET_ENDIAN_DEFAULT 0
+#ifndef TARGET_LITTLE_ENDIAN
+#define TARGET_LITTLE_ENDIAN   0
 #endif
+#define TARGET_BIG_ENDIAN       (! TARGET_LITTLE_ENDIAN)
 
 /* This defaults us to m32r.  */
 #ifndef TARGET_CPU_DEFAULT
 #define TARGET_CPU_DEFAULT 0
 #endif
 
-/* Macro to define tables used to set the flags.
-   This is a list in braces of pairs in braces,
-   each pair being { "NAME", VALUE }
-   where VALUE is the bits to set or minus the bits to clear.
-   An empty string NAME is used to identify the default VALUE.  */
-
-#ifndef SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES
-#endif
-
-#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT)
-#endif
-
-#define TARGET_SWITCHES                                                        \
-{                                                                      \
-/*  { "relax",                 TARGET_RELAX_MASK, "" },                \
-    { "no-relax",              -TARGET_RELAX_MASK, "" },*/             \
-    { "debug",                 TARGET_DEBUG_MASK,                      \
-       N_("Display compile time statistics") },                        \
-    { "align-loops",           TARGET_ALIGN_LOOPS_MASK,                \
-       N_("Align all loops to 32 byte boundary") },                    \
-    { "no-align-loops",                -TARGET_ALIGN_LOOPS_MASK, "" },         \
-    { "issue-rate=1",          TARGET_LOW_ISSUE_RATE_MASK,             \
-       N_("Only issue one instruction per cycle") },                   \
-    { "issue-rate=2",          -TARGET_LOW_ISSUE_RATE_MASK, "" },      \
-    { "branch-cost=1",         TARGET_BRANCH_COST_MASK,                \
-       N_("Prefer branches over conditional execution") },             \
-    { "branch-cost=2",         -TARGET_BRANCH_COST_MASK, "" },         \
-    SUBTARGET_SWITCHES                                                 \
-    { "", TARGET_DEFAULT, "" }                                         \
-}
-
-extern const char * m32r_model_string;
-extern const char * m32r_sdata_string;
-
-/* Cache-flush support.  */
-extern const char * m32r_cache_flush_func;
-extern const char * m32r_cache_flush_trap_string;
-extern int m32r_cache_flush_trap;
-
-#ifndef SUBTARGET_OPTIONS
-#define SUBTARGET_OPTIONS
-#endif
-
-#define TARGET_OPTIONS                                                 \
-{                                                                      \
-  { "model=", & m32r_model_string,                                     \
-    N_("Code size: small, medium or large"), 0},                       \
-  { "sdata=", & m32r_sdata_string,                                     \
-    N_("Small data area: none, sdata, use"), 0},                       \
-  { "no-flush-func", & m32r_cache_flush_func,                          \
-    N_("Don't call any cache flush functions") },                      \
-  { "flush-func=", & m32r_cache_flush_func,                            \
-    N_("Specify cache flush function") },                              \
-  { "no-flush-trap", & m32r_cache_flush_trap_string,                   \
-    N_("Don't call any cache flush trap") },                           \
-  { "flush-trap=", & m32r_cache_flush_trap_string,                     \
-    N_("Specify cache flush trap number") }                            \
-  SUBTARGET_OPTIONS                                                    \
-}
-
 /* Code Models
 
    Code models are used to select between two choices of two separate
@@ -357,7 +237,7 @@ extern enum m32r_model m32r_model;
 
 /* The default is the small model.  */
 #ifndef M32R_MODEL_DEFAULT
-#define M32R_MODEL_DEFAULT "small"
+#define M32R_MODEL_DEFAULT M32R_MODEL_SMALL
 #endif
 
 /* Small Data Area
@@ -407,7 +287,7 @@ extern enum m32r_sdata m32r_sdata;
 /* Default is to disable the SDA
    [for upward compatibility with previous toolchains].  */
 #ifndef M32R_SDATA_DEFAULT
-#define M32R_SDATA_DEFAULT "none"
+#define M32R_SDATA_DEFAULT M32R_SDATA_NONE
 #endif
 
 /* Define this macro as a C expression for the initializer of an array of
@@ -422,53 +302,9 @@ extern enum m32r_sdata m32r_sdata;
 #define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS }
 #endif
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
 #ifndef SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS
 #endif
-
-#define OVERRIDE_OPTIONS                       \
-  do                                           \
-    {                                          \
-      /* These need to be done at start up.    \
-        It's convenient to do them here.  */   \
-      m32r_init ();                            \
-      SUBTARGET_OVERRIDE_OPTIONS               \
-    }                                          \
-  while (0)
-
-#ifndef SUBTARGET_OPTIMIZATION_OPTIONS
-#define SUBTARGET_OPTIMIZATION_OPTIONS
-#endif
-
-#define OPTIMIZATION_OPTIONS(LEVEL, SIZE)      \
-  do                                           \
-    {                                          \
-      if (LEVEL == 1)                          \
-       flag_regmove = TRUE;                    \
-                                               \
-      if (SIZE)                                        \
-       {                                       \
-         flag_omit_frame_pointer = TRUE;       \
-         flag_strength_reduce = FALSE;         \
-       }                                       \
-                                               \
-      SUBTARGET_OPTIMIZATION_OPTIONS           \
-    }                                          \
-  while (0)
-
-/* Define this macro if debugging can be performed even without a
-   frame pointer.  If this macro is defined, GCC will turn on the
-   `-fomit-frame-pointer' option whenever `-O' is specified.  */
-#define CAN_DEBUG_WITHOUT_FP
 \f
 /* Target machine storage layout.  */
 
@@ -483,12 +319,6 @@ extern enum m32r_sdata m32r_sdata;
    numbered.  */
 #define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0)
 
-/* Define this macro if WORDS_BIG_ENDIAN is not constant.  This must
-   be a constant value with the same meaning as WORDS_BIG_ENDIAN,
-   which will be used only when compiling libgcc2.c.  Typically the
-   value will be set based on preprocessor defines.  */
-/*#define LIBGCC2_WORDS_BIG_ENDIAN 1*/
-
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD 4
 
@@ -633,6 +463,8 @@ extern enum m32r_sdata m32r_sdata;
   SUBTARGET_CALL_USED_REGISTERS        \
 }
 
+#define CALL_REALLY_USED_REGISTERS CALL_USED_REGISTERS
+
 /* Zero or more C statements that may conditionally modify two variables
    `fixed_regs' and `call_used_regs' (both of type `char []') after they
    have been initialized from the two preceding macros.
@@ -649,7 +481,10 @@ extern enum m32r_sdata m32r_sdata;
   do                                                    \
     {                                                   \
       if (flag_pic)                                     \
-          fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;      \
+       {                                                \
+         fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;       \
+         call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;   \
+       }                                                \
     }                                                   \
   while (0)
 #endif
@@ -740,6 +575,11 @@ enum reg_class
   NO_REGS, CARRY_REG, ACCUM_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES
 };
 
+#define IRA_COVER_CLASSES                              \
+{                                                      \
+  ACCUM_REGS, GENERAL_REGS, LIM_REG_CLASSES            \
+}
+
 #define N_REG_CLASSES ((int) LIM_REG_CLASSES)
 
 /* Give names of register classes as strings for dump file.  */
@@ -786,11 +626,6 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 #define INDEX_REG_CLASS GENERAL_REGS
 #define BASE_REG_CLASS GENERAL_REGS
 
-#define REG_CLASS_FROM_LETTER(C)                       \
-  (  (C) == 'c'        ? CARRY_REG                             \
-   : (C) == 'a'        ? ACCUM_REGS                            \
-   :             NO_REGS)
-
 /* These assume that REGNO is a hard or pseudo reg number.
    They give nonzero only if REGNO is a hard reg of the suitable class
    or a pseudo reg currently allocated to a suitable hard reg.
@@ -803,96 +638,21 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 
 #define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO)
 
-/* Given an rtx X being reloaded into a reg required to be
-   in class CLASS, return the class of reg to actually use.
-   In general this is just CLASS; but on some machines
-   in some cases it is preferable to use a more restrictive class.  */
-#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
-
 /* Return the maximum number of consecutive registers
    needed to represent mode MODE in a register of class CLASS.  */
 #define CLASS_MAX_NREGS(CLASS, MODE) \
   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
-/* The letters I, J, K, L, M, N, O, P in a register constraint string
-   can be used to stand for particular ranges of immediate operands.
-   This macro defines what the ranges are.
-   C is the letter, and VALUE is a constant value.
-   Return 1 if VALUE is in the range specified by C.  */
-/* 'I' is used for 8 bit signed immediates.
-   'J' is used for 16 bit signed immediates.
-   'K' is used for 16 bit unsigned immediates.
-   'L' is used for 16 bit immediates left shifted by 16 (sign ???).
-   'M' is used for 24 bit unsigned immediates.
-   'N' is used for any 32 bit non-symbolic value.
-   'O' is used for 5 bit unsigned immediates (shift count).
-   'P' is used for 16 bit signed immediates for compares
-       (values in the range -32767 to +32768).  */
-
 /* Return true if a value is inside a range.  */
-#define IN_RANGE_P(VALUE, LOW, HIGH)                                   \
-  (((unsigned HOST_WIDE_INT)((VALUE) - (LOW)))                         \
+#define IN_RANGE_P(VALUE, LOW, HIGH)                   \
+  (((unsigned HOST_WIDE_INT)((VALUE) - (LOW)))         \
    <= ((unsigned HOST_WIDE_INT)((HIGH) - (LOW))))
 
-/* Local to this file.  */
-#define INT8_P(X)      ((X) >= -   0x80 && (X) <= 0x7f)
+/* Some range macros.  */
 #define INT16_P(X)     ((X) >= - 0x8000 && (X) <= 0x7fff)
 #define CMP_INT16_P(X) ((X) >= - 0x7fff && (X) <= 0x8000)
-#define UPPER16_P(X)  (((X) & 0xffff) == 0                             \
-                       && ((X) >> 16) >= - 0x8000                      \
-                       && ((X) >> 16) <= 0x7fff)
 #define UINT16_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0x0000ffff)
 #define UINT24_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0x00ffffff)
-#define UINT32_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0xffffffff)
-#define UINT5_P(X)    ((X) >= 0 && (X) < 32)
-#define INVERTED_SIGNED_8BIT(VAL) ((VAL) >= -127 && (VAL) <= 128)
-
-#define CONST_OK_FOR_LETTER_P(VALUE, C)                                        \
-  (  (C) == 'I' ? INT8_P (VALUE)                                       \
-   : (C) == 'J' ? INT16_P (VALUE)                                      \
-   : (C) == 'K' ? UINT16_P (VALUE)                                     \
-   : (C) == 'L' ? UPPER16_P (VALUE)                                    \
-   : (C) == 'M' ? UINT24_P (VALUE)                                     \
-   : (C) == 'N' ? INVERTED_SIGNED_8BIT (VALUE)                         \
-   : (C) == 'O' ? UINT5_P (VALUE)                                      \
-   : (C) == 'P' ? CMP_INT16_P (VALUE)                                  \
-   : 0)
-
-/* Similar, but for floating constants, and defining letters G and H.
-   Here VALUE is the CONST_DOUBLE rtx itself.
-   For the m32r, handle a few constants inline.
-   ??? We needn't treat DI and DF modes differently, but for now we do.  */
-#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                         \
-  (  (C) == 'G' ? easy_di_const (VALUE)                                        \
-   : (C) == 'H' ? easy_df_const (VALUE)                                        \
-   : 0)
-
-/* A C expression that defines the optional machine-dependent constraint
-   letters that can be used to segregate specific types of operands,
-   usually memory references, for the target machine.  It should return 1 if
-   VALUE corresponds to the operand type represented by the constraint letter
-   C.  If C is not defined as an extra constraint, the value returned should
-   be 0 regardless of VALUE.  */
-/* Q is for symbolic addresses loadable with ld24.
-   R is for symbolic addresses when ld24 can't be used.
-   S is for stores with pre {inc,dec}rement
-   T is for indirect of a pointer.
-   U is for loads with post increment.  */
-
-#define EXTRA_CONSTRAINT(VALUE, C)                                     \
-  (  (C) == 'Q' ? ((TARGET_ADDR24 && GET_CODE (VALUE) == LABEL_REF)    \
-                || addr24_operand (VALUE, VOIDmode))                   \
-   : (C) == 'R' ? ((TARGET_ADDR32 && GET_CODE (VALUE) == LABEL_REF)    \
-                || addr32_operand (VALUE, VOIDmode))                   \
-   : (C) == 'S' ? (GET_CODE (VALUE) == MEM                             \
-                && STORE_PREINC_PREDEC_P (GET_MODE (VALUE),            \
-                                          XEXP (VALUE, 0)))            \
-   : (C) == 'T' ? (GET_CODE (VALUE) == MEM                             \
-                && memreg_operand (VALUE, GET_MODE (VALUE)))           \
-   : (C) == 'U' ? (GET_CODE (VALUE) == MEM                             \
-                && LOAD_POSTINC_P (GET_MODE (VALUE),                   \
-                                   XEXP (VALUE, 0)))                   \
-   : 0)
 \f
 /* Stack layout and stack pointer usage.  */
 
@@ -907,7 +667,7 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 /* The frame pointer points at the same place as the stack pointer, except if
    alloca has been called.  */
 #define STARTING_FRAME_OFFSET \
-  M32R_STACK_ALIGN (current_function_outgoing_args_size)
+  M32R_STACK_ALIGN (crtl->outgoing_args_size)
 
 /* Offset from the stack pointer register to the first location at which
    outgoing arguments are placed.  */
@@ -955,11 +715,6 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 \f
 /* Eliminating the frame and arg pointers.  */
 
-/* A C expression which is nonzero if a function must have and use a
-   frame pointer.  This expression is evaluated in the reload pass.
-   If its value is nonzero the function will have a frame pointer.  */
-#define FRAME_POINTER_REQUIRED current_function_calls_alloca
-
 #if 0
 /* C statement to store the difference between the frame pointer
    and the stack pointer values immediately after the function prologue.
@@ -983,18 +738,6 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
  { ARG_POINTER_REGNUM,  STACK_POINTER_REGNUM },        \
  { ARG_POINTER_REGNUM,   FRAME_POINTER_REGNUM }}
 
-/* A C expression that returns nonzero if the compiler is allowed to
-   try to replace register number FROM-REG with register number
-   TO-REG.  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 things that the compiler
-   already knows about.  */
-
-#define CAN_ELIMINATE(FROM, TO)                                                \
-  ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM                \
-   ? ! frame_pointer_needed                                            \
-   : 1)
-
 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It
    specifies the initial difference between the specified pair of
    registers.  This macro must be defined if `ELIMINABLE_REGS' is
@@ -1008,11 +751,11 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
       if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)      \
        (OFFSET) = 0;                                                           \
       else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM)   \
-       (OFFSET) = size - current_function_pretend_args_size;                   \
+       (OFFSET) = size - crtl->args.pretend_args_size;                 \
       else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)   \
-       (OFFSET) = size - current_function_pretend_args_size;                   \
+       (OFFSET) = size - crtl->args.pretend_args_size;                 \
       else                                                                     \
-       abort ();                                                               \
+       gcc_unreachable ();                                                             \
     }                                                                          \
   while (0)
 \f
@@ -1020,25 +763,11 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 
 /* 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
+   `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.  */
 #define ACCUMULATE_OUTGOING_ARGS 1
 
-/* Value is the number of bytes of arguments automatically
-   popped when returning from a subroutine call.
-   FUNDECL is the declaration node of the function (as a tree),
-   FUNTYPE is the data type of the function (as a tree),
-   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.  */
-#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
-
-/* Nonzero if we do not know how to pass TYPE solely in registers.  */
-#define MUST_PASS_IN_STACK(MODE, TYPE)                 \
-  ((TYPE) != 0                                         \
-   && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST     \
-       || TREE_ADDRESSABLE (TYPE)))
-
 /* Define a data type for recording info about an argument list
    during the scan of that argument list.  This data type should
    hold all necessary information about the function itself
@@ -1059,79 +788,6 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 #define FUNCTION_ARG_REGNO_P(N) \
   ((unsigned) (N) < M32R_MAX_PARM_REGS)
 
-/* The ROUND_ADVANCE* macros are local to this file.  */
-/* Round SIZE up to a word boundary.  */
-#define ROUND_ADVANCE(SIZE) \
-  (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-
-/* Round arg MODE/TYPE up to the next word boundary.  */
-#define ROUND_ADVANCE_ARG(MODE, TYPE) \
-  ((MODE) == BLKmode                           \
-   ? ROUND_ADVANCE ((unsigned int) int_size_in_bytes (TYPE))   \
-   : ROUND_ADVANCE ((unsigned int) GET_MODE_SIZE (MODE)))
-
-/* Round CUM up to the necessary point for argument MODE/TYPE.  */
-#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) (CUM)
-
-/* Return boolean indicating arg of type TYPE and mode MODE will be passed in
-   a reg.  This includes arguments that have to be passed by reference as the
-   pointer to them is passed in a reg if one is available (and that is what
-   we're given).
-   This macro is only used in this file.  */
-#define PASS_IN_REG_P(CUM, MODE, TYPE) \
-  (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < M32R_MAX_PARM_REGS)
-
-/* Determine where to put an argument to a function.
-   Value is zero to push the argument on the stack,
-   or a hard register in which to store the argument.
-
-   MODE is the argument's machine mode.
-   TYPE is the data type of the argument (as a tree).
-    This is null for libcalls where that information may
-    not be available.
-   CUM is a variable of type CUMULATIVE_ARGS which gives info about
-    the preceding args and about the function being called.
-   NAMED is nonzero if this argument is a named parameter
-    (otherwise it is an extra parameter matching an ellipsis).  */
-/* On the M32R the first M32R_MAX_PARM_REGS args are normally in registers
-   and the rest are pushed.  */
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-  (PASS_IN_REG_P ((CUM), (MODE), (TYPE))                       \
-   ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))   \
-   : 0)
-
-/* 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 @var{n} words of arguments are passed in registers, and the rest
-   on the stack.  If a multi-word argument (a @code{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.  */
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
-  function_arg_partial_nregs (&CUM, (int)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.  */
-/* All arguments greater than 8 bytes are passed this way.  */
-#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
-  ((TYPE) && m32r_pass_by_reference (TYPE))
-
-/* Update the data in CUM to advance over an argument
-   of mode MODE and data type TYPE.
-   (TYPE is null for libcalls where that information may not be available.)  */
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-  ((CUM) = (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \
-         + ROUND_ADVANCE_ARG ((MODE), (TYPE))))
-
 /* If defined, a C expression that gives the alignment boundary, in bits,
    of an argument with the specified mode and type.  If it is not defined, 
    PARM_BOUNDARY is used for all arguments.  */
@@ -1141,28 +797,9 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
   (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \
    ? PARM_BOUNDARY : 2 * PARM_BOUNDARY)
 #endif
-
-/* Implement `va_arg'.  */
-#define EXPAND_BUILTIN_VA_ARG(valist, type) \
-  m32r_va_arg (valist, type)
 \f
 /* Function results.  */
 
-/* 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.  */
-#define FUNCTION_VALUE(VALTYPE, FUNC) gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
-
-/* Define how to find the value returned by a library function
-   assuming the value has mode MODE.  */
-#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)
-
-/* 1 if N is a possible register number for a function value
-   as seen by the caller.  */
-/* ??? What about r1 in DI/DF values.  */
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
-
 /* Tell GCC to use TARGET_RETURN_IN_MEMORY.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0
 \f
@@ -1221,44 +858,12 @@ L2:     .word STATIC
 #define CACHE_FLUSH_FUNC "_flush_cache"
 #endif
 #ifndef CACHE_FLUSH_TRAP
-#define CACHE_FLUSH_TRAP "12"
+#define CACHE_FLUSH_TRAP 12
 #endif
 
 /* Length in bytes of the trampoline for entering a nested function.  */
 #define TRAMPOLINE_SIZE 24
 
-/* Emit RTL insns to initialize the variable parts of a trampoline.
-   FNADDR is an RTX for the address of the function's pure code.
-   CXT is an RTX for the static chain value for the function.  */
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                              \
-  do                                                                           \
-    {                                                                          \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 0)),          \
-                     GEN_INT                                                   \
-                     (TARGET_LITTLE_ENDIAN ? 0x017e8e17 : 0x178e7e01));        \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)),          \
-                     GEN_INT                                                   \
-                     (TARGET_LITTLE_ENDIAN ? 0x0c00ae86 : 0x86ae000c));        \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 8)),          \
-                     GEN_INT                                                   \
-                     (TARGET_LITTLE_ENDIAN ? 0xe627871e : 0x1e8727e6));        \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 12)),         \
-                     GEN_INT                                                   \
-                     (TARGET_LITTLE_ENDIAN ? 0xc616c626 : 0x26c61fc6));        \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 16)),         \
-                     (CXT));                                                   \
-      emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 20)),         \
-                     (FNADDR));                                                \
-      if (m32r_cache_flush_trap_string && m32r_cache_flush_trap_string[0])     \
-       emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)),\
-                                    GEN_INT (m32r_cache_flush_trap) ));        \
-      else if (m32r_cache_flush_func && m32r_cache_flush_func[0])              \
-       emit_library_call (gen_rtx_SYMBOL_REF (Pmode, m32r_cache_flush_func),   \
-                          0, VOIDmode, 3, TRAMP, Pmode,                        \
-                          GEN_INT (TRAMPOLINE_SIZE), SImode,                   \
-                          GEN_INT (3), SImode);                                \
-    }                                                                          \
-  while (0)
 \f
 #define RETURN_ADDR_RTX(COUNT, FRAME) m32r_return_addr (COUNT)
 
@@ -1279,21 +884,21 @@ L2:     .word STATIC
 #define CONSTANT_ADDRESS_P(X)   \
   (    GET_CODE (X) == LABEL_REF  \
    ||  GET_CODE (X) == SYMBOL_REF \
-   ||  GET_CODE (X) == CONST_INT  \
+   ||  CONST_INT_P (X)  \
    || (GET_CODE (X) == CONST      \
        && ! (flag_pic && ! m32r_legitimate_pic_operand_p (X))))
 
 /* Nonzero if the constant value X is a legitimate general operand.
    We don't allow (plus symbol large-constant) as the relocations can't
-   describe it.  INTVAL > 32767 handles both 16 bit and 24 bit relocations.
+   describe it.  INTVAL > 32767 handles both 16-bit and 24-bit relocations.
    We allow all CONST_DOUBLE's as the md file patterns will force the
    constant to memory if they can't handle them.  */
 
 #define LEGITIMATE_CONSTANT_P(X)                                       \
   (! (GET_CODE (X) == CONST                                            \
       && GET_CODE (XEXP (X, 0)) == PLUS                                        \
-      && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF                        \
-      && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT                 \
+      && (GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF || GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
+      && CONST_INT_P (XEXP (XEXP (X, 0), 1))                   \
       && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (X, 0), 1)) > 32767))
 
 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
@@ -1340,7 +945,7 @@ L2:     .word STATIC
 
 /* Local to this file.  */
 #define RTX_OK_FOR_OFFSET_P(X) \
-  (GET_CODE (X) == CONST_INT && INT16_P (INTVAL (X)))
+  (CONST_INT_P (X) && INT16_P (INTVAL (X)))
 
 /* Local to this file.  */
 #define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X)                   \
@@ -1362,7 +967,7 @@ L2:     .word STATIC
 #define LOAD_POSTINC_P(MODE, X)                                        \
   (((MODE) == SImode || (MODE) == SFmode)                      \
    && GET_CODE (X) == POST_INC                                 \
-   && GET_CODE (XEXP (X, 0)) == REG                            \
+   && REG_P (XEXP (X, 0))                              \
    && RTX_OK_FOR_BASE_P (XEXP (X, 0)))
 
 /* Local to this file.  */
@@ -1370,7 +975,7 @@ L2:     .word STATIC
 #define STORE_PREINC_PREDEC_P(MODE, X)                         \
   (((MODE) == SImode || (MODE) == SFmode)                      \
    && (GET_CODE (X) == PRE_INC || GET_CODE (X) == PRE_DEC)     \
-   && GET_CODE (XEXP (X, 0)) == REG                            \
+   && REG_P (XEXP (X, 0))                              \
    && RTX_OK_FOR_BASE_P (XEXP (X, 0)))
 
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                        \
@@ -1388,42 +993,6 @@ L2:     .word STATIC
        goto ADDR;                                              \
     }                                                          \
   while (0)
-
-/* Try machine-dependent ways of modifying an illegitimate address
-   to be legitimate.  If we find one, return the new, valid address.
-   This macro is used in only one place: `memory_address' in explow.c.
-
-   OLDX is the address as it was before break_out_memory_refs was called.
-   In some cases it is useful to look at this to decide what needs to be done.
-
-   MODE and WIN are passed so that this macro can use
-   GO_IF_LEGITIMATE_ADDRESS.
-
-   It is always safe for this macro to do nothing.  It exists to recognize
-   opportunities to optimize the output.  */
-
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)                  \
-  do                                                            \
-    {                                                           \
-      if (flag_pic)                                             \
-       (X) = m32r_legitimize_pic_address (X, NULL_RTX);         \
-      if (memory_address_p (MODE, X))                           \
-       goto WIN;                                                \
-    }                                                           \
-  while (0)
-
-/* Go to LABEL if ADDR (a legitimate address expression)
-   has an effect that depends on the machine mode it is used for.  */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)              \
-  do                                                           \
-    {                                                          \
-      if (   GET_CODE (ADDR) == PRE_DEC                                \
-         || GET_CODE (ADDR) == PRE_INC                         \
-         || GET_CODE (ADDR) == POST_INC                        \
-         || GET_CODE (ADDR) == LO_SUM)                         \
-       goto LABEL;                                             \
-    }                                                          \
-  while (0)
 \f
 /* Condition code usage.  */
 
@@ -1433,21 +1002,11 @@ L2:     .word STATIC
 \f
 /* Costs.  */
 
-/* Compute extra cost of moving data between one register class
-   and another.  */
-#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
-
-/* Compute the cost of moving data between registers and memory.  */
-/* Memory is 3 times as expensive as registers.
-   ??? Is that the right way to look at it?  */
-#define MEMORY_MOVE_COST(MODE,CLASS,IN_P) \
-(GET_MODE_SIZE (MODE) <= UNITS_PER_WORD ? 6 : 12)
-
 /* The cost of a branch insn.  */
 /* A value of 2 here causes GCC to avoid using branches in comparisons like
    while (a < N && a).  Branches aren't that expensive on the M32R so
    we define this as 1.  Defining it as 2 had a heavy hit in fp-bit.c.  */
-#define BRANCH_COST ((TARGET_BRANCH_COST) ? 2 : 1)
+#define BRANCH_COST(speed_p, predictable_p) ((TARGET_BRANCH_COST) ? 2 : 1)
 
 /* Nonzero if access to memory by bytes is slow and undesirable.
    For RISC chips, it means that access to memory by bytes is no
@@ -1488,22 +1047,6 @@ L2:     .word STATIC
 /* This register is call-saved on the M32R.  */
 /*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*/
 
-/* By generating position-independent code, when two different programs (A
-   and B) share a common library (libC.a), the text of the library can be
-   shared whether or not the library is linked at the same address for both
-   programs.  In some of these environments, position-independent code
-   requires not only the use of different addressing modes, but also
-   special code to enable the use of these addressing modes.
-
-   The FINALIZE_PIC macro serves as a hook to emit these special
-   codes once the function is being compiled into assembly code, but not
-   before.  (It is not done before, because in the case of compiling an
-   inline function, it would lead to multiple PIC prologues being
-   included in functions which used inline functions and were compiled to
-   assembly language.)  */
-
-#define FINALIZE_PIC m32r_finalize_pic ()
-
 /* A C expression that is nonzero if X is a legitimate immediate
    operand on the target machine when generating position independent code.
    You can assume that X satisfies CONSTANT_P, so you need not
@@ -1531,27 +1074,27 @@ L2:     .word STATIC
 /* Globalizing directive for a label.  */
 #define GLOBAL_ASM_OP "\t.global\t"
 
-/* If -Os, don't force line number labels to begin at the beginning of
-   the word; we still want the assembler to try to put things in parallel,
-   should that be possible.
-   For m32r/d, instructions are never in parallel (other than with a nop)
-   and the simulator and stub both handle a breakpoint in the middle of
-   a word so don't ever force line number labels to begin at the beginning
-   of a word.  */
+/* We do not use DBX_LINES_FUNCTION_RELATIVE or
+   dbxout_stab_value_internal_label_diff here because
+   we need to use .debugsym for the line label.  */
 
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter)                    \
+#define DBX_OUTPUT_SOURCE_LINE(file, line, counter)                    \
   do                                                                   \
     {                                                                  \
-      fprintf (file, ".stabn 68,0,%d,.LM%d-",                          \
-              line, counter);                                          \
-      assemble_name                                                    \
-       (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));   \
-      fprintf (file, (optimize_size || TARGET_M32R)                    \
-              ? "\n\t.debugsym .LM%d\n"                                \
-              : "\n.LM%d:\n",                                          \
-              counter);                                                \
-    }                                                                  \
+      const char * begin_label =                                       \
+       XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);           \
+      char label[64];                                                  \
+      ASM_GENERATE_INTERNAL_LABEL (label, "LM", counter);              \
+                                                                       \
+      dbxout_begin_stabn_sline (line);                                 \
+      assemble_name (file, label);                                     \
+      putc ('-', file);                                                        \
+      assemble_name (file, begin_label);                               \
+      fputs ("\n\t.debugsym ", file);                                  \
+      assemble_name (file, label);                                     \
+      putc ('\n', file);                                               \
+      counter += 1;                                                    \
+     }                                                                 \
   while (0)
 
 /* How to refer to registers in assembler output.
@@ -1585,24 +1128,6 @@ L2:     .word STATIC
   SUBTARGET_ADDITIONAL_REGISTER_NAMES  \
 }
 
-/* A C expression which evaluates to true if CODE is a valid
-   punctuation character for use in the `PRINT_OPERAND' macro.  */
-extern char m32r_punct_chars[256];
-#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
-  m32r_punct_chars[(unsigned char) (CHAR)]
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
-   CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
-   For `%' followed by punctuation, CODE is the punctuation and X is null.  */
-#define PRINT_OPERAND(FILE, X, CODE) \
-  m32r_print_operand (FILE, X, CODE)
-
-/* 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 ADDR.  ADDR is an RTL expression.  */
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
-  m32r_print_operand_address (FILE, ADDR)
-
 /* If defined, C string expressions to be used for the `%R', `%L',
    `%U', and `%I' options of `asm_fprintf' (see `final.c').  These
    are useful when a single `md' file must support multiple assembler
@@ -1681,7 +1206,8 @@ extern char m32r_punct_chars[256];
   do                                                                   \
     {                                                                  \
       if (! TARGET_SDATA_NONE                                          \
-         && (SIZE) > 0 && (SIZE) <= g_switch_value)                    \
+         && (SIZE) > 0                                                 \
+         && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)         \
        fprintf ((FILE), "%s", SCOMMON_ASM_OP);                         \
       else                                                             \
        fprintf ((FILE), "%s", COMMON_ASM_OP);                          \
@@ -1694,10 +1220,11 @@ extern char m32r_punct_chars[256];
   do                                                                   \
     {                                                                  \
       if (! TARGET_SDATA_NONE                                          \
-          && (SIZE) > 0 && (SIZE) <= g_switch_value)                   \
-        named_section (0, ".sbss", 0);                                 \
+          && (SIZE) > 0                                                        \
+         && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)         \
+        switch_to_section (get_named_section (NULL, ".sbss", 0));      \
       else                                                             \
-        bss_section ();                                                        \
+        switch_to_section (bss_section);                               \
       ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));     \
       last_assemble_variable_decl = DECL;                              \
       ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);                      \
@@ -1711,9 +1238,9 @@ extern char m32r_punct_chars[256];
 #define DBX_DEBUGGING_INFO    1
 #define DWARF2_DEBUGGING_INFO 1
 
-/* Prefer STABS (for now).  */
+/* Use DWARF2 debugging info by default.  */
 #undef  PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 /* Turn off splitting of long stabs.  */
 #define DBX_CONTIN_LENGTH 0
@@ -1731,7 +1258,7 @@ extern char m32r_punct_chars[256];
 /* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
    will either zero-extend or sign-extend.  The value of this macro should
    be the code that says which one of the two operations is implicitly
-   done, NIL if none.  */
+   done, UNKNOWN if none.  */
 #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Max number of bytes we can move from memory
@@ -1749,20 +1276,14 @@ extern char m32r_punct_chars[256];
 /* 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.  */
-/* ??? The M32R doesn't have full 32 bit pointers, but making this PSImode has
-   it's own problems (you have to add extendpsisi2 and truncsipsi2).
+/* ??? The M32R doesn't have full 32-bit pointers, but making this PSImode has
+   its own problems (you have to add extendpsisi2 and truncsipsi2).
    Try to avoid it.  */
 #define Pmode SImode
 
 /* A function address in a call instruction.  */
 #define FUNCTION_MODE SImode
 \f
-/* Define the information needed to generate branch and scc insns.  This is
-   stored from the compare operation.  Note that we can't use "rtx" here
-   since it hasn't been defined!  */
-extern struct rtx_def * m32r_compare_op0;
-extern struct rtx_def * m32r_compare_op1;
-
 /* M32R function types.  */
 enum m32r_function_type
 {
@@ -1771,39 +1292,9 @@ enum m32r_function_type
 
 #define M32R_INTERRUPT_P(TYPE) ((TYPE) == M32R_FUNCTION_INTERRUPT)
 
-/* Define this if you have defined special-purpose predicates in the
-   file `MACHINE.c'.  This macro is called within an initializer of an
-   array of structures.  The first field in the structure is the name
-   of a predicate and the second field is an array of rtl codes.  For
-   each predicate, list all rtl codes that can be in expressions
-   matched by the predicate.  The list should have a trailing comma.  */
-
-#define PREDICATE_CODES                                                        \
-{ "reg_or_zero_operand",        { REG, SUBREG, CONST_INT }},            \
-{ "conditional_move_operand",  { REG, SUBREG, CONST_INT }},            \
-{ "carry_compare_operand",     { EQ, NE }},                            \
-{ "eqne_comparison_operator",  { EQ, NE }},                            \
-{ "signed_comparison_operator", { EQ, NE, LT, LE, GT, GE }},           \
-{ "move_dest_operand",         { REG, SUBREG, MEM }},                  \
-{ "move_src_operand",          { REG, SUBREG, MEM, CONST_INT,          \
-                                 CONST_DOUBLE, LABEL_REF, CONST,       \
-                                 SYMBOL_REF }},                        \
-{ "move_double_src_operand",   { REG, SUBREG, MEM, CONST_INT,          \
-                                 CONST_DOUBLE }},                      \
-{ "two_insn_const_operand",    { CONST_INT }},                         \
-{ "symbolic_operand",          { SYMBOL_REF, LABEL_REF, CONST }},      \
-{ "seth_add3_operand",         { SYMBOL_REF, LABEL_REF, CONST }},      \
-{ "int8_operand",              { CONST_INT }},                         \
-{ "uint16_operand",            { CONST_INT }},                         \
-{ "reg_or_int16_operand",      { REG, SUBREG, CONST_INT }},            \
-{ "reg_or_uint16_operand",     { REG, SUBREG, CONST_INT }},            \
-{ "reg_or_cmp_int16_operand",  { REG, SUBREG, CONST_INT }},            \
-{ "reg_or_eq_int16_operand",   { REG, SUBREG, CONST_INT }},            \
-{ "cmp_int16_operand",         { CONST_INT }},                         \
-{ "call_address_operand",      { SYMBOL_REF, LABEL_REF, CONST }},      \
-{ "extend_operand",            { REG, SUBREG, MEM }},                  \
-{ "small_insn_p",              { INSN, CALL_INSN, JUMP_INSN }},        \
-{ "m32r_block_immediate_operand",{ CONST_INT }},                       \
-{ "large_insn_p",              { INSN, CALL_INSN, JUMP_INSN }},        \
-{ "seth_add3_operand",         { SYMBOL_REF, LABEL_REF, CONST }},
-
+/* The maximum number of bytes to copy using pairs of load/store instructions.
+   If a block is larger than this then a loop will be generated to copy
+   MAX_MOVE_BYTES chunks at a time.  The value of 32 is a semi-arbitrary choice.
+   A customer uses Dhrystome as their benchmark, and Dhrystone has a 31 byte
+   string copy in it.  */
+#define MAX_MOVE_BYTES 32