===================================================================
@@ -53,6 +53,15 @@ #define HARD_REG_SET_LONGS \
struct HARD_REG_SET
{
+ HARD_REG_SET
+ operator~ () const
+ {
+ HARD_REG_SET res;
+ for (unsigned int i = 0; i < ARRAY_SIZE (elts); ++i)
+ res.elts[i] = ~elts[i];
+ return res;
+ }
+
HARD_REG_ELT_TYPE elts[HARD_REG_SET_LONGS];
};
typedef const HARD_REG_SET &const_hard_reg_set;
@@ -83,11 +92,6 @@ #define HARD_CONST(X) ((HARD_REG_ELT_TYP
CLEAR_HARD_REG_SET and SET_HARD_REG_SET.
These take just one argument.
- Also define macros for copying the complement of a hard reg set:
- COMPL_HARD_REG_SET.
- This takes two arguments TO and FROM; it reads from FROM
- and stores into TO.
-
Also define macros for combining hard reg sets:
IOR_HARD_REG_SET and AND_HARD_REG_SET.
These take two arguments TO and FROM; they read from FROM
@@ -116,8 +120,6 @@ #define TEST_HARD_REG_BIT(SET, BIT) \
#define CLEAR_HARD_REG_SET(TO) ((TO) = HARD_CONST (0))
#define SET_HARD_REG_SET(TO) ((TO) = ~ HARD_CONST (0))
-#define COMPL_HARD_REG_SET(TO, FROM) ((TO) = ~(FROM))
-
#define IOR_HARD_REG_SET(TO, FROM) ((TO) |= (FROM))
#define IOR_COMPL_HARD_REG_SET(TO, FROM) ((TO) |= ~ (FROM))
#define AND_HARD_REG_SET(TO, FROM) ((TO) &= (FROM))
@@ -185,13 +187,6 @@ SET_HARD_REG_SET (HARD_REG_SET &set)
}
inline void
-COMPL_HARD_REG_SET (HARD_REG_SET &to, const_hard_reg_set from)
-{
- for (unsigned int i = 0; i < ARRAY_SIZE (to.elts); ++i)
- to.elts[i] = ~from.elts[i];
-}
-
-inline void
AND_HARD_REG_SET (HARD_REG_SET &to, const_hard_reg_set from)
{
for (unsigned int i = 0; i < ARRAY_SIZE (to.elts); ++i)
===================================================================
@@ -1094,7 +1094,7 @@ c6x_call_saved_register_used (tree call_
INIT_CUMULATIVE_ARGS (cum_v, NULL, NULL, 0, 0);
cum = pack_cumulative_args (&cum_v);
- COMPL_HARD_REG_SET (call_saved_regset, call_used_reg_set);
+ call_saved_regset = ~call_used_reg_set;
for (i = 0; i < call_expr_nargs (call_expr); i++)
{
parameter = CALL_EXPR_ARG (call_expr, i);
@@ -3472,7 +3472,7 @@ try_rename_operands (rtx_insn *head, rtx
}
/* If we get here, we can do the renaming. */
- COMPL_HARD_REG_SET (unavailable, reg_class_contents[(int) super_class]);
+ unavailable = ~reg_class_contents[super_class];
old_reg = this_head->regno;
best_reg =
===================================================================
@@ -6908,11 +6908,8 @@ push_regs (HARD_REG_SET *mask, bool inte
if (i == FIRST_FP_REG && interrupt_handler && TARGET_FMOVD
&& hard_reg_set_intersect_p (*mask, reg_class_contents[DF_REGS]))
{
- HARD_REG_SET unsaved;
-
push (FPSCR_REG);
- COMPL_HARD_REG_SET (unsaved, *mask);
- fpscr_set_from_mem (NORMAL_MODE (FP_MODE), unsaved);
+ fpscr_set_from_mem (NORMAL_MODE (FP_MODE), ~*mask);
skip_fpscr = true;
}
if (i != PR_REG
===================================================================
@@ -496,7 +496,7 @@ find_hard_regno_for_1 (int regno, int *c
conflict_set = lra_no_alloc_regs;
else
{
- COMPL_HARD_REG_SET (conflict_set, regno_set);
+ conflict_set = ~regno_set;
IOR_HARD_REG_SET (conflict_set, lra_no_alloc_regs);
}
rclass = regno_allocno_class_array[regno];
===================================================================
@@ -4559,7 +4559,7 @@ contains_reg_p (rtx x, bool hard_reg_p,
regno = lra_get_regno_hard_regno (regno);
if (regno < 0)
return false;
- COMPL_HARD_REG_SET (alloc_regs, lra_no_alloc_regs);
+ alloc_regs = ~lra_no_alloc_regs;
return overlaps_hard_reg_set_p (alloc_regs, GET_MODE (x), regno);
}
else
===================================================================
@@ -4310,7 +4310,7 @@ finish_spills (int global)
may be not included in the value calculated here because
of possible removing caller-saves insns (see function
delete_caller_save_insns. */
- COMPL_HARD_REG_SET (chain->used_spill_regs, used_by_pseudos);
+ chain->used_spill_regs = ~used_by_pseudos;
AND_HARD_REG_SET (chain->used_spill_regs, used_spill_regs);
}
}
@@ -6257,7 +6257,7 @@ choose_reload_regs_init (class insn_chai
CLEAR_HARD_REG_SET (reload_reg_used_in_outaddr_addr[i]);
}
- COMPL_HARD_REG_SET (reload_reg_unavailable, chain->used_spill_regs);
+ reload_reg_unavailable = ~chain->used_spill_regs;
CLEAR_HARD_REG_SET (reload_reg_used_for_inherit);