Hello. Ian Lance Taylor writes: > Anatoly Sokolov writes: >> >> * For an interrupt function it is safety to use only call-used registers >> which are saved in prologue. In 'rename_registers' optimization pass this >> check is done in HARD_REGNO_RENAME_OK macro. This patch add >> HARD_REGNO_SCRATCH_OK macro for 'peephole2' pass. The >> HARD_REGNO_SCRATCH_OK macro sould be difined for target which use interrupt >> and 'match_scratch' in peephole2 (avr, m68k). > > Please make a new target hook instead (I know that the existing > HARD_REGNO_RENAME_OK is still a macro). Thanks. Andy H writes: > Typo: > >default_hard_regno_scrath_ok > >default_hard_regno_scratch_ok Thanks You, Andy. 2008-06-19 Anatoly Sokolov * target.h (struct gcc_target): Add hard_regno_scratch_ok field. * target-def.h (TARGET_HARD_REGNO_SCRATCH_OK): New. (TARGET_INITIALIZER): Use TARGET_HARD_REGNO_SCRATCH_OK. * targhooks.c (default_hard_regno_scratch_ok): New function. * targhooks.h (default_hard_regno_scratch_ok): Declare function. * doc/tm.texi: Document TARGET_HARD_REGNO_SCRATCH_OK hook. * recog.c (peep2_find_free_register): Add check for global regs. Add target specific check. Anatoly.