From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18985 invoked by alias); 5 Oct 2011 10:38:49 -0000 Received: (qmail 18977 invoked by uid 22791); 5 Oct 2011 10:38:49 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Oct 2011 10:38:34 +0000 Received: by wwf10 with SMTP id 10so1939129wwf.8 for ; Wed, 05 Oct 2011 03:38:33 -0700 (PDT) Received: by 10.227.133.144 with SMTP id f16mr2823360wbt.97.1317811112056; Wed, 05 Oct 2011 03:38:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.107.5 with HTTP; Wed, 5 Oct 2011 03:38:12 -0700 (PDT) In-Reply-To: <4E8C2875.1070303@gjlay.de> References: <4E8181C2.5000706@gjlay.de> <4E8C2875.1070303@gjlay.de> From: Denis Chertykov Date: Wed, 05 Oct 2011 10:43:00 -0000 Message-ID: Subject: Re: Ping #1: [Patch,AVR]: Clean-up some SP insns To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org, Eric Weddington Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00315.txt.bz2 2011/10/5 Georg-Johann Lay : > > Ping #1: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01690.html > > Georg-Johann Lay wrote: > >> This is just a code clean-up. >> >> The bulky code from *addhi3_sp_R_pc2 and *addhi3_sp_R_pc3 is done by a s= mall C >> function that does the same (except that it prints some comment dependin= g on >> -dp or -fverbose-asm). >> >> *movhi_sp is an insn that should not be there and go away because it is = a move >> insn and there should be at most one move insn per mode (HImode in this = case). >> >> stack_register_operand, i.e. (REG:HI 32), is in register class STACK_REG= , thus >> not in NO_REGS, thus element of register_operand, general_regs and >> nonimmediate_operand which are the predicates/condition of *movhi. =C2= =A0*movhi >> already knows to handle "q,r" and "r,q" moves, same applies to the output >> function output_movhi. >> >> The patch passes the test suite, of course. >> >> Ok? >> >> Moreover, I'd like to remove constraint "R" which is just used in one in= sn now >> and replace it by 3-letter constraint C.. so that prefix R is free. >> >> R is of absolutely no use in inline assembly and the constraint can be >> renamed/removed from documentation, IMO. >> >> Johann >> >> =C2=A0 =C2=A0 =C2=A0 * config/avr/avr-protos.h (avr_out_addto_sp): New p= rototype. >> =C2=A0 =C2=A0 =C2=A0 * config/avr/avr.c (avr_out_addto_sp): New function. >> =C2=A0 =C2=A0 =C2=A0 (adjust_insn_length): Handle ADJUST_LEN_ADDTO_SP. >> =C2=A0 =C2=A0 =C2=A0 * config/avr/avr.md (adjust_len): Add "addto_sp". >> =C2=A0 =C2=A0 =C2=A0 (*movhi_sp): Remove insn. >> =C2=A0 =C2=A0 =C2=A0 (*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): Merge to *add= hi3_sp_R. Please commit. Denis.