This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re:[PING] Patch Fix PR32871 -- [avr] gcc is pushing too many registers


Anatoly,

can you approve this so I can comit to avr mainline? It's been listed for a long time.

best regards

Andy


Andy H wrote:
The attached patch fixs:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32871

Although the bug is against the AVR target it reveals a weakness in using df_regs_ever_live_p.
to determine register to save and restore that may apply to other targets.


The fix determines which registers are used as arguments to function using
INIT_CUMULATIVE_ARGS, FUNCTION_ARG and FUNCTION_ARG_ADVANCE
(This is patch is thus relatively portable for other targets)


The argument registers are then omitted from epilog/prolog save and restores
(as all argument registers are assumed clobbered.)


Tested against HEAD and had no new regression for torture/execute testsuite.
Please review with the intention of committing this chnage for avr target.



2000-03-02 Andrew Hutchinson <hutchinsonandy@aim.com>


   PR target/32871
   * config/avr/avr.c (avr_args): Add new function to set argument
   registers in bitmap.
   (avr_regs_to_save): Don't mark argument registers for saving.
   (sequent_regs_live): Add bitmap argument. Use bitmap to determine
   sequence of registers.
   (expand_prologue): Pass bitmap of registers for sequence.
   (expand_epilogue): Pass bitmap of registers for sequence.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]