From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8079 invoked by alias); 5 Oct 2011 09:51:22 -0000 Received: (qmail 8068 invoked by uid 22791); 5 Oct 2011 09:51:21 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Oct 2011 09:51:06 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by post.strato.de (mrclete mo15) (RZmta 26.10 AUTH) with ESMTPA id U03348n959chSX ; Wed, 5 Oct 2011 11:50:47 +0200 (MEST) Message-ID: <4E8C2875.1070303@gjlay.de> Date: Wed, 05 Oct 2011 10:09:00 -0000 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Denis Chertykov , Eric Weddington Subject: Re: Ping #1: [Patch,AVR]: Clean-up some SP insns References: <4E8181C2.5000706@gjlay.de> In-Reply-To: <4E8181C2.5000706@gjlay.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00312.txt.bz2 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 small C > function that does the same (except that it prints some comment depending 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. *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 insn 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 > > * 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.