-#define SMALL_REGISTER_CLASSES TARGET_THUMB
-
-/* Get reg_class from a letter such as appears in the machine description.
- We only need constraint `f' for FPA_REGS (`r' == GENERAL_REGS) for the
- ARM, but several more letters for the Thumb. */
-#define REG_CLASS_FROM_LETTER(C) \
- ( (C) == 'f' ? FPA_REGS \
- : (C) == 'v' ? CIRRUS_REGS \
- : (C) == 'w' ? VFP_REGS \
- : (C) == 'y' ? IWMMXT_REGS \
- : (C) == 'z' ? IWMMXT_GR_REGS \
- : (C) == 'l' ? (TARGET_ARM ? GENERAL_REGS : LO_REGS) \
- : TARGET_ARM ? NO_REGS \
- : (C) == 'h' ? HI_REGS \
- : (C) == 'b' ? BASE_REGS \
- : (C) == 'k' ? STACK_REG \
- : (C) == 'c' ? CC_REG \
- : NO_REGS)
-
-/* The letters I, J, K, L and M 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: immediate arithmetic operand (i.e. 8 bits shifted as required).
- J: valid indexing constants.
- K: ~value ok in rhs argument of data operand.
- L: -value ok in rhs argument of data operand.
- M: 0..32, or a power of 2 (for shifts, or mult done by shift). */
-#define CONST_OK_FOR_ARM_LETTER(VALUE, C) \
- ((C) == 'I' ? const_ok_for_arm (VALUE) : \
- (C) == 'J' ? ((VALUE) < 4096 && (VALUE) > -4096) : \
- (C) == 'K' ? (const_ok_for_arm (~(VALUE))) : \
- (C) == 'L' ? (const_ok_for_arm (-(VALUE))) : \
- (C) == 'M' ? (((VALUE >= 0 && VALUE <= 32)) \
- || (((VALUE) & ((VALUE) - 1)) == 0)) \
- : 0)
-
-#define CONST_OK_FOR_THUMB_LETTER(VAL, C) \
- ((C) == 'I' ? (unsigned HOST_WIDE_INT) (VAL) < 256 : \
- (C) == 'J' ? (VAL) > -256 && (VAL) < 0 : \
- (C) == 'K' ? thumb_shiftable_const (VAL) : \
- (C) == 'L' ? (VAL) > -8 && (VAL) < 8 : \
- (C) == 'M' ? ((unsigned HOST_WIDE_INT) (VAL) < 1024 \
- && ((VAL) & 3) == 0) : \
- (C) == 'N' ? ((unsigned HOST_WIDE_INT) (VAL) < 32) : \
- (C) == 'O' ? ((VAL) >= -508 && (VAL) <= 508) \
- : 0)
-
-#define CONST_OK_FOR_LETTER_P(VALUE, C) \
- (TARGET_ARM ? \
- CONST_OK_FOR_ARM_LETTER (VALUE, C) : CONST_OK_FOR_THUMB_LETTER (VALUE, C))
-
-/* Constant letter 'G' for the FP immediate constants.
- 'H' means the same constant negated. */
-#define CONST_DOUBLE_OK_FOR_ARM_LETTER(X, C) \
- ((C) == 'G' ? arm_const_double_rtx (X) : \
- (C) == 'H' ? neg_const_double_rtx_ok_for_fpa (X) : 0)
-
-#define CONST_DOUBLE_OK_FOR_LETTER_P(X, C) \
- (TARGET_ARM ? \
- CONST_DOUBLE_OK_FOR_ARM_LETTER (X, C) : 0)
-
-/* For the ARM, `Q' means that this is a memory operand that is just
- an offset from a register.
- `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) == '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)
-
-#define 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 \
- && GET_CODE (XEXP (X, 0)) == LABEL_REF) : 0)
-
-#define EXTRA_CONSTRAINT_STR(X, C, STR) \
- (TARGET_ARM \
- ? EXTRA_CONSTRAINT_STR_ARM (X, C, STR) \
- : EXTRA_CONSTRAINT_THUMB (X, C))
-
-#define EXTRA_MEMORY_CONSTRAINT(C, STR) ((C) == 'U')