/* Bit masks of integer registers, which contain branch target, used
by call thunk functions. */
-static int indirect_thunks_used;
+static HARD_REG_SET indirect_thunks_used;
/* True if return thunk function is needed. */
static bool indirect_return_needed = false;
for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
{
- unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
- if ((indirect_thunks_used & (1 << i)))
+ if (TEST_HARD_REG_BIT (indirect_thunks_used, regno))
output_indirect_thunk_function (indirect_thunk_prefix_none,
regno, false);
}
char name[32];
tree decl;
- if ((indirect_thunks_used & (1 << regno)))
+ if (TEST_HARD_REG_BIT (indirect_thunks_used, regno))
output_indirect_thunk_function (indirect_thunk_prefix_none,
regno, false);
!= indirect_branch_thunk_inline)
{
if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
- {
- int i = regno;
- if (i >= FIRST_REX_INT_REG)
- i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
- indirect_thunks_used |= 1 << i;
- }
+ SET_HARD_REG_BIT (indirect_thunks_used, regno);
+
indirect_thunk_name (thunk_name_buf, regno, need_prefix, false);
thunk_name = thunk_name_buf;
}
if (need_thunk)
{
indirect_return_via_cx = true;
- indirect_thunks_used |= 1 << CX_REG;
+ SET_HARD_REG_BIT (indirect_thunks_used, CX_REG);
}
fprintf (asm_out_file, "\tjmp\t");
assemble_name (asm_out_file, thunk_name);