+/* Similar, but here we don't have to move if the first index is a
+ subset of the second so in that case the cost is zero. */
+extern move_table *may_move_in_cost[MAX_MACHINE_MODE];
+
+/* Similar, but here we don't have to move if the first index is a
+ superset of the second so in that case the cost is zero. */
+extern move_table *may_move_out_cost[MAX_MACHINE_MODE];
+
+/* Return an exclusive upper bound on the registers occupied by hard
+ register (reg:MODE REGNO). */
+
+static inline unsigned int
+end_hard_regno (enum machine_mode mode, unsigned int regno)
+{
+ return regno + hard_regno_nregs[regno][(int) mode];
+}
+
+/* Likewise for hard register X. */
+
+#define END_HARD_REGNO(X) end_hard_regno (GET_MODE (X), REGNO (X))
+
+/* Likewise for hard or pseudo register X. */
+
+#define END_REGNO(X) (HARD_REGISTER_P (X) ? END_HARD_REGNO (X) : REGNO (X) + 1)
+
+/* Add to REGS all the registers required to store a value of mode MODE
+ in register REGNO. */
+
+static inline void
+add_to_hard_reg_set (HARD_REG_SET *regs, enum machine_mode mode,
+ unsigned int regno)
+{
+ unsigned int end_regno;
+
+ end_regno = end_hard_regno (mode, regno);
+ do
+ SET_HARD_REG_BIT (*regs, regno);
+ while (++regno < end_regno);
+}
+
+/* Likewise, but remove the registers. */
+
+static inline void
+remove_from_hard_reg_set (HARD_REG_SET *regs, enum machine_mode mode,
+ unsigned int regno)
+{
+ unsigned int end_regno;
+
+ end_regno = end_hard_regno (mode, regno);
+ do
+ CLEAR_HARD_REG_BIT (*regs, regno);
+ while (++regno < end_regno);
+}
+
+/* Return true if REGS contains the whole of (reg:MODE REGNO). */
+
+static inline bool
+in_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode,
+ unsigned int regno)
+{
+ unsigned int end_regno;
+
+ if (!TEST_HARD_REG_BIT (regs, regno))
+ return false;
+
+ end_regno = end_hard_regno (mode, regno);
+ while (++regno < end_regno)
+ if (!TEST_HARD_REG_BIT (regs, regno))
+ return false;
+
+ return true;
+}
+
+/* Return true if (reg:MODE REGNO) includes an element of REGS. */
+
+static inline bool
+overlaps_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode,
+ unsigned int regno)
+{
+ unsigned int end_regno;
+
+ if (TEST_HARD_REG_BIT (regs, regno))
+ return true;
+
+ end_regno = end_hard_regno (mode, regno);
+ while (++regno < end_regno)
+ if (TEST_HARD_REG_BIT (regs, regno))
+ return true;
+
+ return false;
+}
+