Hide regs_invalidated_by_call etc.
The previous patches removed all target-independent uses of regs_invalidated_by_call, call_used_or_fixed_regs and call_used_or_fixed_reg_p. This patch therefore restricts them to target-specific code (and reginfo.c, which sets them up). 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * hard-reg-set.h (regs_invalidated_by_call): Only define if IN_TARGET_CODE. (call_used_or_fixed_regs): Likewise. (call_used_or_fixed_reg_p): Likewise. * reginfo.c (regs_invalidated_by_call): New macro. From-SVN: r276338
This commit is contained in:
parent
b21a62b624
commit
7c3958812b
|
@ -1,3 +1,11 @@
|
||||||
|
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
|
||||||
|
|
||||||
|
* hard-reg-set.h (regs_invalidated_by_call): Only define if
|
||||||
|
IN_TARGET_CODE.
|
||||||
|
(call_used_or_fixed_regs): Likewise.
|
||||||
|
(call_used_or_fixed_reg_p): Likewise.
|
||||||
|
* reginfo.c (regs_invalidated_by_call): New macro.
|
||||||
|
|
||||||
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
|
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
|
||||||
|
|
||||||
* shrink-wrap.c: Include function-abi.h.
|
* shrink-wrap.c: Include function-abi.h.
|
||||||
|
|
|
@ -477,10 +477,12 @@ extern struct target_hard_regs *this_target_hard_regs;
|
||||||
#endif
|
#endif
|
||||||
#define savable_regs \
|
#define savable_regs \
|
||||||
(this_target_hard_regs->x_savable_regs)
|
(this_target_hard_regs->x_savable_regs)
|
||||||
|
#ifdef IN_TARGET_CODE
|
||||||
#define regs_invalidated_by_call \
|
#define regs_invalidated_by_call \
|
||||||
(this_target_hard_regs->x_regs_invalidated_by_call)
|
(this_target_hard_regs->x_regs_invalidated_by_call)
|
||||||
#define call_used_or_fixed_regs \
|
#define call_used_or_fixed_regs \
|
||||||
(regs_invalidated_by_call | fixed_reg_set)
|
(regs_invalidated_by_call | fixed_reg_set)
|
||||||
|
#endif
|
||||||
#define reg_alloc_order \
|
#define reg_alloc_order \
|
||||||
(this_target_hard_regs->x_reg_alloc_order)
|
(this_target_hard_regs->x_reg_alloc_order)
|
||||||
#define inv_reg_alloc_order \
|
#define inv_reg_alloc_order \
|
||||||
|
@ -509,6 +511,7 @@ extern const char * reg_class_names[];
|
||||||
#define REG_CAN_CHANGE_MODE_P(REGN, FROM, TO) \
|
#define REG_CAN_CHANGE_MODE_P(REGN, FROM, TO) \
|
||||||
(targetm.can_change_mode_class (FROM, TO, REGNO_REG_CLASS (REGN)))
|
(targetm.can_change_mode_class (FROM, TO, REGNO_REG_CLASS (REGN)))
|
||||||
|
|
||||||
|
#ifdef IN_TARGET_CODE
|
||||||
/* Return true if register REGNO is either fixed or call-used
|
/* Return true if register REGNO is either fixed or call-used
|
||||||
(aka call-clobbered). */
|
(aka call-clobbered). */
|
||||||
|
|
||||||
|
@ -517,5 +520,6 @@ call_used_or_fixed_reg_p (unsigned int regno)
|
||||||
{
|
{
|
||||||
return fixed_regs[regno] || this_target_hard_regs->x_call_used_regs[regno];
|
return fixed_regs[regno] || this_target_hard_regs->x_call_used_regs[regno];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ! GCC_HARD_REG_SET_H */
|
#endif /* ! GCC_HARD_REG_SET_H */
|
||||||
|
|
|
@ -69,6 +69,8 @@ struct target_regs *this_target_regs = &default_target_regs;
|
||||||
|
|
||||||
#define call_used_regs \
|
#define call_used_regs \
|
||||||
(this_target_hard_regs->x_call_used_regs)
|
(this_target_hard_regs->x_call_used_regs)
|
||||||
|
#define regs_invalidated_by_call \
|
||||||
|
(this_target_hard_regs->x_regs_invalidated_by_call)
|
||||||
|
|
||||||
/* Data for initializing fixed_regs. */
|
/* Data for initializing fixed_regs. */
|
||||||
static const char initial_fixed_regs[] = FIXED_REGISTERS;
|
static const char initial_fixed_regs[] = FIXED_REGISTERS;
|
||||||
|
|
Loading…
Reference in New Issue