Problem with HARD_REGNO_CALL_PART_CLOBBERED: some changes
Richard Henderson
rth@redhat.com
Wed Mar 6 14:55:00 GMT 2002
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~
More information about the Gcc-patches
mailing list