MSP430: Remove unused msp430_hard_regno_nregs_*_padding functions
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Thu, 24 Oct 2019 13:36:52 +0000 (13:36 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Thu, 24 Oct 2019 13:36:52 +0000 (13:36 +0000)
2019-10-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* 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
gcc/config/msp430/msp430.c

index eb0a2f9..7b433bf 100644 (file)
@@ -1,5 +1,11 @@
 2019-10-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
 
+       * 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  <jozef.l@mittosystems.com>
+
        * config/msp430/constraints.md: Allow post_inc for "Ya" constraint.
        * config/msp430/msp430.md (430x_shift_left): Use RLAM when the constant
        shift amount is between 1 and 4.
index cd39433..fe1fcc0 100644 (file)
@@ -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