From 39a6e72a9e0889180783c2e8810042503b511b11 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 24 Oct 2019 13:36:52 +0000 Subject: [PATCH] MSP430: Remove unused msp430_hard_regno_nregs_*_padding functions 2019-10-24 Jozef Lawrynowicz * config/msp430/msp430.c (msp430_hard_regno_nregs_has_padding): Remove and add comment. (msp430_hard_regno_nregs_with_padding): Remove. From-SVN: r277395 --- gcc/ChangeLog | 6 ++++++ gcc/config/msp430/msp430.c | 25 +++---------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb0a2f9b510..7b433bf59a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-24 Jozef Lawrynowicz + + * config/msp430/msp430.c (msp430_hard_regno_nregs_has_padding): Remove + and add comment. + (msp430_hard_regno_nregs_with_padding): Remove. + 2019-10-24 Jozef Lawrynowicz * config/msp430/constraints.md: Allow post_inc for "Ya" constraint. diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index cd394333983..fe1fcc0db43 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -332,28 +332,9 @@ msp430_hard_regno_nregs (unsigned int, machine_mode mode) / UNITS_PER_WORD); } -/* Implements HARD_REGNO_NREGS_HAS_PADDING. */ -int -msp430_hard_regno_nregs_has_padding (int regno ATTRIBUTE_UNUSED, - machine_mode mode) -{ - if (mode == PSImode && msp430x) - return 1; - return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) - / UNITS_PER_WORD); -} - -/* Implements HARD_REGNO_NREGS_WITH_PADDING. */ -int -msp430_hard_regno_nregs_with_padding (int regno ATTRIBUTE_UNUSED, - machine_mode mode) -{ - if (mode == PSImode) - return 2; - if (mode == CPSImode) - return 4; - return msp430_hard_regno_nregs (regno, mode); -} +/* subreg_get_info correctly handles PSImode registers, so defining + HARD_REGNO_NREGS_HAS_PADDING and HARD_REGNO_NREGS_WITH_PADDING + has no effect. */ #undef TARGET_HARD_REGNO_MODE_OK #define TARGET_HARD_REGNO_MODE_OK msp430_hard_regno_mode_ok -- 2.30.2