OSDN Git Service

* config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / arm.h
index 0ba70f9..6310a62 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
    More major hacks by Richard Earnshaw (rearnsha@arm.com)
@@ -26,7 +26,7 @@
 #ifndef GCC_ARM_H
 #define GCC_ARM_H
 
-/* The archetecture define.  */
+/* The architecture define.  */
 extern char arm_arch_name[];
 
 /* Target CPU builtins.  */
@@ -83,8 +83,8 @@ extern char arm_arch_name[];
 /* The various ARM cores.  */
 enum processor_type
 {
-#define ARM_CORE(NAME, ARCH, FLAGS, COSTS) \
-  NAME,
+#define ARM_CORE(NAME, IDENT, ARCH, FLAGS, COSTS) \
+  IDENT,
 #include "arm-cores.def"
 #undef ARM_CORE
   /* Used to indicate that no processor has been specified.  */
@@ -93,8 +93,8 @@ enum processor_type
 
 enum target_cpus
 {
-#define ARM_CORE(NAME, ARCH, FLAGS, COSTS) \
-  TARGET_CPU_##NAME,
+#define ARM_CORE(NAME, IDENT, ARCH, FLAGS, COSTS) \
+  TARGET_CPU_##IDENT,
 #include "arm-cores.def"
 #undef ARM_CORE
   TARGET_CPU_generic
@@ -125,6 +125,8 @@ extern const char *target_fpu_name;
 extern const char *target_fpe_name;
 /* Whether to use floating point hardware.  */
 extern const char *target_float_abi_name;
+/* For -m{soft,hard}-float.  */
+extern const char *target_float_switch;
 /* Which ABI to use.  */
 extern const char *target_abi_name;
 /* Define the information needed to generate branch insns.  This is
@@ -212,9 +214,7 @@ extern GTY(()) rtx aof_pic_label;
 #define ARM_FLAG_APCS_REENT    (1 << 6)
 
   /* FLAG 0x0080 now spare (used to be alignment traps).  */
-/* Nonzero if all floating point instructions are missing (and there is no
-   emulator either).  Generate function calls for all ops in this case.  */
-#define ARM_FLAG_SOFT_FLOAT    (1 << 8)
+  /* FLAG (1 << 8) is now spare (used to be soft-float).  */
 
 /* Nonzero if we should compile with BYTES_BIG_ENDIAN set to 1.  */
 #define ARM_FLAG_BIG_END       (1 << 9)
@@ -329,10 +329,6 @@ extern GTY(()) rtx aof_pic_label;
   {"apcs-reentrant",           ARM_FLAG_APCS_REENT,                    \
    N_("Generate re-entrant, PIC code") },                              \
   {"no-apcs-reentrant",               -ARM_FLAG_APCS_REENT, "" },              \
-  {"soft-float",               ARM_FLAG_SOFT_FLOAT,                    \
-   N_("Use library calls to perform FP operations") },                 \
-  {"hard-float",              -ARM_FLAG_SOFT_FLOAT,                    \
-   N_("Use hardware floating point instructions") },                   \
   {"big-endian",               ARM_FLAG_BIG_END,                       \
    N_("Assume target CPU is configured as big endian") },              \
   {"little-endian",           -ARM_FLAG_BIG_END,                       \
@@ -397,7 +393,11 @@ extern GTY(()) rtx aof_pic_label;
    N_("Specify the minimum bit alignment of structures"), 0},          \
   {"pic-register=", & arm_pic_register_string,                         \
    N_("Specify the register to be used for PIC addressing"), 0},       \
-  {"abi=", &target_abi_name, N_("Specify an ABI"), 0}                  \
+  {"abi=", &target_abi_name, N_("Specify an ABI"), 0},                 \
+  {"soft-float", &target_float_switch,                                 \
+   N_("Alias for -mfloat-abi=soft"), "s"},                             \
+  {"hard-float", &target_float_switch,                                 \
+   N_("Alias for -mfloat-abi=hard"), "h"}                              \
 }
 
 /* Support for a compile-time default CPU, et cetera.  The rules are:
@@ -481,6 +481,10 @@ enum float_abi_type
 
 extern enum float_abi_type arm_float_abi;
 
+#ifndef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+#endif
+
 /* Which ABI to use.  */
 enum arm_abi_type
 {
@@ -521,7 +525,7 @@ extern int arm_ld_sched;
 extern int thumb_code;
 
 /* Nonzero if this chip is a StrongARM.  */
-extern int arm_is_strong;
+extern int arm_tune_strongarm;
 
 /* Nonzero if this chip is a Cirrus variant.  */
 extern int arm_arch_cirrus;
@@ -532,11 +536,11 @@ extern int arm_arch_iwmmxt;
 /* Nonzero if this chip is an XScale.  */
 extern int arm_arch_xscale;
 
-/* Nonzero if tuning for XScale  */
+/* Nonzero if tuning for XScale.  */
 extern int arm_tune_xscale;
 
-/* Nonzero if this chip is an ARM6 or an ARM7.  */
-extern int arm_is_6_or_7;
+/* Nonzero if tuning for stores via the write buffer.  */
+extern int arm_tune_wbuf;
 
 /* Nonzero if we should define __THUMB_INTERWORK__ in the
    preprocessor.
@@ -603,9 +607,10 @@ extern int arm_cpp_interwork;
     }
 
 #define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE)   \
-  if (GET_MODE_CLASS (MODE) == MODE_INT                \
-      && GET_MODE_SIZE (MODE) < 4)             \
-    (MODE) = SImode;                           \
+  if ((GET_MODE_CLASS (MODE) == MODE_INT               \
+       || GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT)    \
+      && GET_MODE_SIZE (MODE) < 4)                      \
+    (MODE) = SImode;                                   \
 
 /* Define this if most significant bit is lowest numbered
    in instructions that operate on numbered bit-fields.  */
@@ -896,7 +901,7 @@ extern const char * structure_size_string;
          scratch registers.  */                                        \
       for (regno = FIRST_IWMMXT_GR_REGNUM;                     \
           regno <= LAST_IWMMXT_GR_REGNUM; ++ regno)            \
-       fixed_regs[regno] = call_used_regs[regno] = 0;          \
+       fixed_regs[regno] = 0;                                  \
       /* The XScale ABI has wR0 - wR9 as scratch registers,     \
         the rest as call-preserved registers.  */              \
       for (regno = FIRST_IWMMXT_REGNUM;                                \
@@ -917,10 +922,18 @@ extern const char * structure_size_string;
       fixed_regs[10]     = 1;                                  \
       call_used_regs[10] = 1;                                  \
     }                                                          \
-  if (TARGET_APCS_FRAME)                                       \
+  /* -mcaller-super-interworking reserves r11 for calls to     \
+     _interwork_r11_call_via_rN().  Making the register global \
+     is an easy way of ensuring that it remains valid for all  \
+     calls.  */                                                        \
+  if (TARGET_APCS_FRAME || TARGET_CALLER_INTERWORKING          \
+      || (target_flags & (THUMB_FLAG_LEAF_BACKTRACE            \
+                         | THUMB_FLAG_BACKTRACE)))             \
     {                                                          \
       fixed_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;           \
       call_used_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;       \
+      if (TARGET_CALLER_INTERWORKING)                          \
+       global_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;         \
     }                                                          \
   SUBTARGET_CONDITIONAL_REGISTER_USAGE                         \
 }
@@ -1022,6 +1035,8 @@ extern const char * structure_size_string;
 /* ARM floating pointer registers.  */
 #define FIRST_FPA_REGNUM       16
 #define LAST_FPA_REGNUM        23
+#define IS_FPA_REGNUM(REGNUM) \
+  (((REGNUM) >= FIRST_FPA_REGNUM) && ((REGNUM) <= LAST_FPA_REGNUM))
 
 #define FIRST_IWMMXT_GR_REGNUM 43
 #define LAST_IWMMXT_GR_REGNUM  46
@@ -1054,6 +1069,8 @@ extern const char * structure_size_string;
 /* VFP adds 32 + 1 more.  */
 #define FIRST_PSEUDO_REGISTER   96
 
+#define DBX_REGISTER_NUMBER(REGNO) arm_dbx_register_number (REGNO)
+
 /* Value should be nonzero if functions must have frame pointers.
    Zero means the frame pointer need not be set up (and parms may be accessed
    via the stack pointer) in functions that seem suitable.
@@ -1218,12 +1235,14 @@ enum reg_class
 
 /* For the Thumb the high registers cannot be used as base registers
    when addressing quantities in QI or HI mode; if we don't know the
-   mode, then we must be conservative.  After reload we must also be
-   conservative, since we can't support SP+reg addressing, and we
-   can't fix up any bad substitutions.  */
+   mode, then we must be conservative.  */
 #define MODE_BASE_REG_CLASS(MODE)                                      \
     (TARGET_ARM ? GENERAL_REGS :                                       \
-     (((MODE) == SImode && !reload_completed) ? BASE_REGS : LO_REGS))
+     (((MODE) == SImode) ? BASE_REGS : LO_REGS))
+
+/* For Thumb we can not support SP+reg addressing, so we return LO_REGS
+   instead of BASE_REGS.  */
+#define MODE_BASE_REG_REG_CLASS(MODE) BASE_REG_CLASS
 
 /* When SMALL_REGISTER_CLASSES is nonzero, the compiler allows
    registers explicitly used in the rtl to be used as spill registers
@@ -1297,27 +1316,41 @@ enum reg_class
    `S' means any symbol that has the SYMBOL_REF_FLAG set or a CONSTANT_POOL
    address.  This means that the symbol is in the text segment and can be
    accessed without using a load.
+   'D' Prefixes a number of const_double operands where:
+   'Da' is a constant that takes two ARM insns to load.
+   'Db' takes three ARM insns.
+   'Dc' takes four ARM insns, if we allow that in this compilation.
    'U' Prefixes an extended memory constraint where:
    'Uv' is an address valid for VFP load/store insns.
    'Uy' is an address valid for iwmmxt load/store insns.
    'Uq' is an address valid for ldrsb.  */
 
-#define EXTRA_CONSTRAINT_STR_ARM(OP, C, STR)                   \
-  (((C) == 'Q') ? (GET_CODE (OP) == MEM                                \
-                && GET_CODE (XEXP (OP, 0)) == REG) :           \
-   ((C) == 'R') ? (GET_CODE (OP) == MEM                                \
-                  && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF     \
-                  && CONSTANT_POOL_ADDRESS_P (XEXP (OP, 0))) : \
-   ((C) == 'S') ? (optimize > 0 && CONSTANT_ADDRESS_P (OP)) :  \
-   ((C) == 'T') ? cirrus_memory_offset (OP) :                  \
+#define EXTRA_CONSTRAINT_STR_ARM(OP, C, STR)                           \
+  (((C) == 'D') ? ((GET_CODE (OP) == CONST_DOUBLE                      \
+                   || GET_CODE (OP) == CONST_INT                       \
+                   || GET_CODE (OP) == CONST_VECTOR)                   \
+                  && (((STR)[1] == 'a'                                 \
+                       && arm_const_double_inline_cost (OP) == 2)      \
+                      || ((STR)[1] == 'b'                              \
+                          && arm_const_double_inline_cost (OP) == 3)   \
+                      || ((STR)[1] == 'c'                              \
+                          && arm_const_double_inline_cost (OP) == 4    \
+                          && !(optimize_size || arm_ld_sched)))) :     \
+   ((C) == 'Q') ? (GET_CODE (OP) == MEM                                        \
+                && GET_CODE (XEXP (OP, 0)) == REG) :                   \
+   ((C) == 'R') ? (GET_CODE (OP) == MEM                                        \
+                  && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF             \
+                  && CONSTANT_POOL_ADDRESS_P (XEXP (OP, 0))) :         \
+   ((C) == 'S') ? (optimize > 0 && CONSTANT_ADDRESS_P (OP)) :          \
+   ((C) == 'T') ? cirrus_memory_offset (OP) :                          \
    ((C) == 'U' && (STR)[1] == 'v') ? arm_coproc_mem_operand (OP, FALSE) : \
    ((C) == 'U' && (STR)[1] == 'y') ? arm_coproc_mem_operand (OP, TRUE) : \
-   ((C) == 'U' && (STR)[1] == 'q')                             \
-    ? arm_extendqisi_mem_op (OP, GET_MODE (OP))                        \
-      : 0)
+   ((C) == 'U' && (STR)[1] == 'q')                                     \
+    ? arm_extendqisi_mem_op (OP, GET_MODE (OP))                                \
+   : 0)
 
 #define CONSTRAINT_LEN(C,STR)                          \
-  ((C) == 'U' ? 2 : DEFAULT_CONSTRAINT_LEN (C, STR))
+  (((C) == 'U' || (C) == 'D') ? 2 : DEFAULT_CONSTRAINT_LEN (C, STR))
 
 #define EXTRA_CONSTRAINT_THUMB(X, C)                                   \
   ((C) == 'Q' ? (GET_CODE (X) == MEM                                   \
@@ -1517,6 +1550,20 @@ enum reg_class
    goes at a more negative offset in the frame.  */
 #define FRAME_GROWS_DOWNWARD 1
 
+/* The amount of scratch space needed by _interwork_{r7,r11}_call_via_rN().
+   When present, it is one word in size, and sits at the top of the frame,
+   between the soft frame pointer and either r7 or r11.
+
+   We only need _interwork_rM_call_via_rN() for -mcaller-super-interworking,
+   and only then if some outgoing arguments are passed on the stack.  It would
+   be tempting to also check whether the stack arguments are passed by indirect
+   calls, but there seems to be no reason in principle why a post-reload pass
+   couldn't convert a direct call into an indirect one.  */
+#define CALLER_INTERWORKING_SLOT_SIZE                  \
+  (TARGET_CALLER_INTERWORKING                          \
+   && current_function_outgoing_args_size != 0         \
+   ? UNITS_PER_WORD : 0)
+
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
    first local allocated.  Otherwise, it is the offset to the BEGINNING
@@ -1579,6 +1626,10 @@ enum reg_class
    || (TARGET_ARM && ((REGNO) == FIRST_FPA_REGNUM)                     \
        && TARGET_HARD_FLOAT_ABI && TARGET_FPA))
 
+/* Amount of memory needed for an untyped call to save all possible return
+   registers.  */
+#define APPLY_RESULT_SIZE arm_apply_result_size()
+
 /* How large values are returned */
 /* A C expression which can inhibit the returning of certain function values
    in registers, based on the type of value.  */
@@ -1595,7 +1646,7 @@ enum reg_class
 #define CALL_SHORT             0x00000002      /* Never call indirect.  */
 
 /* These bits describe the different types of function supported
-   by the ARM backend.  They are exclusive.  ie a function cannot be both a
+   by the ARM backend.  They are exclusive.  i.e. a function cannot be both a
    normal function and an interworked function, for example.  Knowing the
    type of a function is important for determining its prologue and
    epilogue sequences.
@@ -1665,9 +1716,17 @@ typedef struct machine_function GTY(())
   /* Records if sibcalls are blocked because an argument
      register is needed to preserve stack alignment.  */
   int sibcall_blocked;
+  /* Labels for per-function Thumb call-via stubs.  One per potential calling
+     register.  We can never call via LR or PC.  We can call via SP if a
+     trampoline happens to be on the top of the stack.  */
+  rtx call_via[14];
 }
 machine_function;
 
+/* As in the machine_function, a global set of call-via labels, for code 
+   that is in text_section().  */
+extern GTY(()) rtx thumb_call_via_label[14];
+
 /* 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 `int' suffices and can hold the number of bytes of argument so far.  */
@@ -1705,15 +1764,16 @@ typedef struct
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
   arm_function_arg (&(CUM), (MODE), (TYPE), (NAMED))
 
-/* For an arg passed partly in registers and partly in memory,
-   this is the number of registers used.
-   For args passed entirely in registers or entirely in memory, zero.  */
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED)             \
-  (arm_vector_mode_supported_p (MODE) ? 0 :                            \
-       NUM_ARG_REGS > (CUM).nregs                                      \
-   && (NUM_ARG_REGS < ((CUM).nregs + ARM_NUM_REGS2 (MODE, TYPE))       \
-   && (CUM).can_split)                                                 \
-   ?   NUM_ARG_REGS - (CUM).nregs : 0)
+#define FUNCTION_ARG_PADDING(MODE, TYPE) \
+  (arm_pad_arg_upward (MODE, TYPE) ? upward : downward)
+
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+  (arm_pad_reg_upward (MODE, TYPE, FIRST) ? upward : downward)
+
+/* For AAPCS, padding should never be below the argument. For other ABIs,
+ * mimic the default.  */
+#define PAD_VARARGS_DOWN \
+  ((TARGET_AAPCS_BASED) ? 0 : BYTES_BIG_ENDIAN)
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
    for a call to a function whose data type is FNTYPE.
@@ -1980,6 +2040,11 @@ typedef struct
    ? THUMB_REGNO_MODE_OK_FOR_BASE_P (REGNO, MODE)      \
    : ARM_REGNO_OK_FOR_BASE_P (REGNO))
 
+/* Nonzero if X can be the base register in a reg+reg addressing mode.
+   For Thumb, we can not use SP + reg, so reject SP.  */
+#define REGNO_MODE_OK_FOR_REG_BASE_P(X, MODE)  \
+  REGNO_OK_FOR_INDEX_P (X)
+
 /* For ARM code, we don't care about the mode, but for Thumb, the index
    must be suitable for use in a QImode load.  */
 #define REGNO_OK_FOR_INDEX_P(REGNO)    \
@@ -2057,9 +2122,61 @@ typedef struct
 #define ASM_OUTPUT_LABELREF(FILE, NAME)                \
    arm_asm_output_labelref (FILE, NAME)
 
+/* The EABI specifies that constructors should go in .init_array.
+   Other targets use .ctors for compatibility.  */
+#ifndef ARM_EABI_CTORS_SECTION_OP
+#define ARM_EABI_CTORS_SECTION_OP \
+  "\t.section\t.init_array,\"aw\",%init_array"
+#endif
+#ifndef ARM_EABI_DTORS_SECTION_OP
+#define ARM_EABI_DTORS_SECTION_OP \
+  "\t.section\t.fini_array,\"aw\",%fini_array"
+#endif
+#define ARM_CTORS_SECTION_OP \
+  "\t.section\t.ctors,\"aw\",%progbits"
+#define ARM_DTORS_SECTION_OP \
+  "\t.section\t.dtors,\"aw\",%progbits"
+
+/* Define CTORS_SECTION_ASM_OP.  */
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+#ifndef IN_LIBGCC2
+# define CTORS_SECTION_ASM_OP \
+   (TARGET_AAPCS_BASED ? ARM_EABI_CTORS_SECTION_OP : ARM_CTORS_SECTION_OP)
+# define DTORS_SECTION_ASM_OP \
+   (TARGET_AAPCS_BASED ? ARM_EABI_DTORS_SECTION_OP : ARM_DTORS_SECTION_OP)
+#else /* !defined (IN_LIBGCC2) */
+/* In libgcc, CTORS_SECTION_ASM_OP must be a compile-time constant,
+   so we cannot use the definition above.  */
+# ifdef __ARM_EABI__
+/* The .ctors section is not part of the EABI, so we do not define
+   CTORS_SECTION_ASM_OP when in libgcc; that prevents crtstuff
+   from trying to use it.  We do define it when doing normal
+   compilation, as .init_array can be used instead of .ctors.  */
+/* There is no need to emit begin or end markers when using
+   init_array; the dynamic linker will compute the size of the
+   array itself based on special symbols created by the static
+   linker.  However, we do need to arrange to set up
+   exception-handling here.  */
+#   define CTOR_LIST_BEGIN asm (ARM_EABI_CTORS_SECTION_OP)
+#   define CTOR_LIST_END /* empty */
+#   define DTOR_LIST_BEGIN asm (ARM_EABI_DTORS_SECTION_OP)
+#   define DTOR_LIST_END /* empty */
+# else /* !defined (__ARM_EABI__) */
+#   define CTORS_SECTION_ASM_OP ARM_CTORS_SECTION_OP
+#   define DTORS_SECTION_ASM_OP ARM_DTORS_SECTION_OP
+# endif /* !defined (__ARM_EABI__) */
+#endif /* !defined (IN_LIBCC2) */
+
+/* True if the operating system can merge entities with vague linkage
+   (e.g., symbols in COMDAT group) during dynamic linking.  */
+#ifndef TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P
+#define TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P true
+#endif
+
 /* Set the short-call flag for any function compiled in the current
    compilation unit.  We skip this for functions with the section
-   attirubte when long-calls are in effect as this tells the compiler
+   attribute when long-calls are in effect as this tells the compiler
    that the section might be placed a long way from the caller.
    See arm_is_longcall_p() for more information.  */
 #define ARM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)  \
@@ -2123,6 +2240,10 @@ typedef struct
    ? THUMB_REG_OK_FOR_INDEX_P (X)              \
    : ARM_REG_OK_FOR_INDEX_P (X))
 
+/* Nonzero if X can be the base register in a reg+reg addressing mode.
+   For Thumb, we can not use SP + reg, so reject SP.  */
+#define REG_MODE_OK_FOR_REG_BASE_P(X, MODE)    \
+  REG_OK_FOR_INDEX_P (X)
 \f
 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
    that is a valid memory address for an instruction.
@@ -2304,7 +2425,12 @@ extern int making_const_table;
 
 #define SELECT_CC_MODE(OP, X, Y)  arm_select_cc_mode (OP, X, Y)
 
-#define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode)
+#define REVERSIBLE_CC_MODE(MODE) 1
+
+#define REVERSE_CONDITION(CODE,MODE) \
+  (((MODE) == CCFPmode || (MODE) == CCFPEmode) \
+   ? reverse_condition_maybe_unordered (code) \
+   : reverse_condition (code))
 
 #define CANONICALIZE_COMPARISON(CODE, OP0, OP1)                                \
   do                                                                   \
@@ -2487,7 +2613,7 @@ extern int making_const_table;
          }                                                             \
                                                                        \
          default:                                                      \
-           abort();                                                    \
+           gcc_unreachable ();                                         \
        }                                                               \
     }                                                                  \
   else if (GET_CODE (X) == PRE_INC || GET_CODE (X) == POST_INC         \
@@ -2495,8 +2621,7 @@ extern int making_const_table;
     {                                                                  \
       extern enum machine_mode output_memory_reference_mode;           \
                                                                        \
-      if (GET_CODE (XEXP (X, 0)) != REG)                               \
-       abort ();                                                       \
+      gcc_assert (GET_CODE (XEXP (X, 0)) == REG);                      \
                                                                        \
       if (GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC)          \
        asm_fprintf (STREAM, "[%r, #%s%d]!",                            \
@@ -2540,8 +2665,7 @@ extern int making_const_table;
     asm_fprintf (STREAM, "%r!", REGNO (XEXP (X, 0)));  \
   else if (GET_CODE (X) == PLUS)                       \
     {                                                  \
-      if (GET_CODE (XEXP (X, 0)) != REG)               \
-        abort ();                                      \
+      gcc_assert (GET_CODE (XEXP (X, 0)) == REG);      \
       if (GET_CODE (XEXP (X, 1)) == CONST_INT)         \
        asm_fprintf (STREAM, "[%r, #%wd]",              \
                     REGNO (XEXP (X, 0)),               \
@@ -2594,57 +2718,6 @@ extern int making_const_table;
    : arm_gen_return_addr_mask ())
 
 \f
-/* Define the codes that are matched by predicates in arm.c */
-#define PREDICATE_CODES                                                        \
-  {"s_register_operand", {SUBREG, REG}},                               \
-  {"arm_general_register_operand", {SUBREG, REG}},                     \
-  {"arm_hard_register_operand", {REG}},                                        \
-  {"f_register_operand", {SUBREG, REG}},                               \
-  {"arm_add_operand",    {SUBREG, REG, CONST_INT}},                    \
-  {"arm_addimm_operand", {CONST_INT}},                                 \
-  {"arm_float_add_operand",    {SUBREG, REG, CONST_DOUBLE}},           \
-  {"arm_float_rhs_operand",    {SUBREG, REG, CONST_DOUBLE}},           \
-  {"arm_rhs_operand",    {SUBREG, REG, CONST_INT}},                    \
-  {"arm_not_operand",    {SUBREG, REG, CONST_INT}},                    \
-  {"reg_or_int_operand", {SUBREG, REG, CONST_INT}},                    \
-  {"index_operand",      {SUBREG, REG, CONST_INT}},                    \
-  {"thumb_cmp_operand",  {SUBREG, REG, CONST_INT}},                    \
-  {"thumb_cmpneg_operand", {CONST_INT}},                               \
-  {"thumb_cbrch_target_operand", {SUBREG, REG, MEM}},                  \
-  {"offsettable_memory_operand", {MEM}},                               \
-  {"alignable_memory_operand", {MEM}},                                 \
-  {"shiftable_operator", {PLUS, MINUS, AND, IOR, XOR}},                        \
-  {"minmax_operator", {SMIN, SMAX, UMIN, UMAX}},                       \
-  {"shift_operator", {ASHIFT, ASHIFTRT, LSHIFTRT, ROTATERT, MULT}},    \
-  {"di_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, MEM}},         \
-  {"nonimmediate_di_operand", {SUBREG, REG, MEM}},                     \
-  {"soft_df_operand", {SUBREG, REG, CONST_DOUBLE, MEM}},               \
-  {"nonimmediate_soft_df_operand", {SUBREG, REG, MEM}},                        \
-  {"load_multiple_operation",  {PARALLEL}},                            \
-  {"store_multiple_operation", {PARALLEL}},                            \
-  {"equality_operator", {EQ, NE}},                                     \
-  {"arm_comparison_operator", {EQ, NE, LE, LT, GE, GT, GEU, GTU, LEU,  \
-                              LTU, UNORDERED, ORDERED, UNLT, UNLE,     \
-                              UNGE, UNGT}},                            \
-  {"arm_rhsm_operand", {SUBREG, REG, CONST_INT, MEM}},                 \
-  {"const_shift_operand", {CONST_INT}},                                        \
-  {"multi_register_push", {PARALLEL}},                                 \
-  {"cc_register", {REG}},                                              \
-  {"logical_binary_operator", {AND, IOR, XOR}},                                \
-  {"cirrus_register_operand", {REG}},                                  \
-  {"cirrus_fp_register", {REG}},                                       \
-  {"cirrus_shift_const", {CONST_INT}},                                 \
-  {"dominant_cc_register", {REG}},                                     \
-  {"arm_float_compare_operand", {REG, CONST_DOUBLE}},                  \
-  {"vfp_compare_operand", {REG, CONST_DOUBLE}},
-
-/* Define this if you have special predicates that know special things
-   about modes.  Genrecog will warn about certain forms of
-   match_operand without a mode; if the operand predicate is listed in
-   SPECIAL_MODE_PREDICATES, the warning will be suppressed.  */
-#define SPECIAL_MODE_PREDICATES                        \
- "cc_register", "dominant_cc_register",
-
 enum arm_builtins
 {
   ARM_BUILTIN_GETWCX,