This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR]: Clean-up some SP insns
- From: Richard Henderson <rth at redhat dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Tue, 27 Sep 2011 08:50:44 -0700
- Subject: Re: [Patch,AVR]: Clean-up some SP insns
- References: <4E8181C2.5000706@gjlay.de>
On 09/27/2011 12:56 AM, Georg-Johann Lay wrote:
> * config/avr/avr-protos.h (avr_out_addto_sp): New prototype.
> * config/avr/avr.c (avr_out_addto_sp): New function.
> (adjust_insn_length): Handle ADJUST_LEN_ADDTO_SP.
> * config/avr/avr.md (adjust_len): Add "addto_sp".
> (*movhi_sp): Remove insn.
> (*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): Merge to *addhi3_sp_R.
While this is a good cleanup by itself, and probably should be
applied by itself, I think a good followup would be to merge
the addhi3_sp_R pattern with the normal addhi3 pattern.
This should be fairly easy, given that both are handled via C
functions now.
r~