diff options
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 16 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.md | 4 |
4 files changed, 11 insertions, 14 deletions
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 25fb10c..189af34 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -61,7 +61,6 @@ extern void arm_gen_unlikely_cbranch (enum rtx_code, machine_mode cc_mode, rtx label_ref); extern bool arm_vector_mode_supported_p (machine_mode); extern bool arm_small_register_classes_for_mode_p (machine_mode); -extern int arm_hard_regno_mode_ok (unsigned int, machine_mode); extern bool arm_modes_tieable_p (machine_mode, machine_mode); extern int const_ok_for_arm (HOST_WIDE_INT); extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code); diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index b278534..3c6c56c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -313,6 +313,7 @@ static unsigned int arm_elf_section_type_flags (tree decl, const char *name, int reloc); static void arm_expand_divmod_libfunc (rtx, machine_mode, rtx, rtx, rtx *, rtx *); static opt_scalar_float_mode arm_floatn_mode (int, bool); +static bool arm_hard_regno_mode_ok (unsigned int, machine_mode); /* Table of machine attributes. */ static const struct attribute_spec arm_attribute_table[] = @@ -780,6 +781,8 @@ static const struct attribute_spec arm_attribute_table[] = #undef TARGET_FIXED_CONDITION_CODE_REGS #define TARGET_FIXED_CONDITION_CODE_REGS arm_fixed_condition_code_regs +#undef TARGET_HARD_REGNO_MODE_OK +#define TARGET_HARD_REGNO_MODE_OK arm_hard_regno_mode_ok /* Obstack for minipool constant handling. */ static struct obstack minipool_obstack; @@ -23344,9 +23347,8 @@ thumb2_asm_output_opcode (FILE * stream) } } -/* Returns true if REGNO is a valid register - for holding a quantity of type MODE. */ -int +/* Implement TARGET_HARD_REGNO_MODE_OK. */ +static bool arm_hard_regno_mode_ok (unsigned int regno, machine_mode mode) { if (GET_MODE_CLASS (mode) == MODE_CC) @@ -23390,7 +23392,7 @@ arm_hard_regno_mode_ok (unsigned int regno, machine_mode mode) || (mode == CImode && NEON_REGNO_OK_FOR_NREGS (regno, 6)) || (mode == XImode && NEON_REGNO_OK_FOR_NREGS (regno, 8)); - return FALSE; + return false; } if (TARGET_REALLY_IWMMXT) @@ -23409,10 +23411,10 @@ arm_hard_regno_mode_ok (unsigned int regno, machine_mode mode) if (regno <= LAST_ARM_REGNUM) { if (ARM_NUM_REGS (mode) > 4) - return FALSE; + return false; if (TARGET_THUMB2) - return TRUE; + return true; return !(TARGET_LDRD && GET_MODE_SIZE (mode) > 4 && (regno & 1) != 0); } @@ -23422,7 +23424,7 @@ arm_hard_regno_mode_ok (unsigned int regno, machine_mode mode) /* We only allow integers in the fake hard registers. */ return GET_MODE_CLASS (mode) == MODE_INT; - return FALSE; + return false; } /* Implement MODES_TIEABLE_P. */ diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 4f53583..4385b7d 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -990,10 +990,6 @@ extern int arm_arch_cmse; && !IS_VFP_REGNUM (REGNO) \ ? 1 : ARM_NUM_REGS (MODE)) -/* Return true if REGNO is suitable for holding a quantity of type MODE. */ -#define HARD_REGNO_MODE_OK(REGNO, MODE) \ - arm_hard_regno_mode_ok ((REGNO), (MODE)) - #define MODES_TIEABLE_P(MODE1, MODE2) arm_modes_tieable_p (MODE1, MODE2) #define VALID_IWMMXT_REG_MODE(MODE) \ diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 242b65b..6380c69 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -5804,7 +5804,7 @@ operands[1] = force_reg (DImode, operands[1]); } if (REG_P (operands[0]) && REGNO (operands[0]) <= LAST_ARM_REGNUM - && !HARD_REGNO_MODE_OK (REGNO (operands[0]), DImode)) + && !targetm.hard_regno_mode_ok (REGNO (operands[0]), DImode)) { /* Avoid LDRD's into an odd-numbered register pair in ARM state when expanding function calls. */ @@ -5823,7 +5823,7 @@ DONE; } else if (REG_P (operands[1]) && REGNO (operands[1]) <= LAST_ARM_REGNUM - && !HARD_REGNO_MODE_OK (REGNO (operands[1]), DImode)) + && !targetm.hard_regno_mode_ok (REGNO (operands[1]), DImode)) { /* Avoid STRD's from an odd-numbered register pair in ARM state when expanding function prologue. */ |