This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with HARD_REGNO_CALL_PART_CLOBBERED: some changes
- From: Richard Henderson <rth at redhat dot com>
- To: "Unruh, Erwin" <Erwin dot Unruh at fujitsu-siemens dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Mar 2002 14:55:22 -0800
- Subject: Re: Problem with HARD_REGNO_CALL_PART_CLOBBERED: some changes
- References: <2BFFCAFAC0A7D4119FE7009027FD76220263EBF5@mchrd21e.mch.fsc.net>
On Wed, Mar 06, 2002 at 01:19:56PM +0100, Unruh, Erwin wrote:
> - take CPP 3.0.2 as base.
You'll need to take the 3.2 trunk as a base if you want a patch of
this nature to be applied. It'll not go into the 3.0 or 3.1 branches.
> - looked at every use of call_used_regs / call_used_reg_set to decide
> whether to check for partially clobbered regs.
I've slowly been getting rid of uses of call_used_regs, since one
has to use other checks simultaneously for correctness, which were
often forgotten. I've been replacing them with uses of
regs_invalidated_by_call as I come across them.
I suggest that you add a
#ifdef HARD_REGNO_CALL_PART_CLOBBERED
#define regs_part_invalidated_by_call(MODE) \
((void)(MODE), regs_invalidated_by_call)
#else
HARD_REG_SET x_regs_part_invalidated_by_call[NUM_MACHINE_MODES];
#define regs_part_invalidated_by_call(MODE) \
x_regs_part_invalidated_by_call[MODE]
#endif
Where x_regs_part_invalidated_by_call is computed like
regs_invalidated_by_call except that it takes
HARD_REGNO_CALL_PART_CLOBBERED to avoid clobbering registers
for appropriate modes.
Then replace uses of regs_invalidated_by_call with
regs_part_invalidated_by_call in the places that the
mode of the register is known.
r~