From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22941 invoked by alias); 22 Jun 2011 16:37:25 -0000 Received: (qmail 22932 invoked by uid 22791); 22 Jun 2011 16:37:25 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,TW_VS X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jun 2011 16:37:11 +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 (jimi mo32) (RZmta 25.18) with ESMTPA id V014d6n5MFiWwZ ; Wed, 22 Jun 2011 18:36:59 +0200 (MEST) Message-ID: <4E021A2B.1080504@gjlay.de> Date: Wed, 22 Jun 2011 17:03:00 -0000 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Hans-Peter Nilsson CC: Denis Chertykov , gcc-patches@gcc.gnu.org, Anatoly Sokolov , "Eric B. Weddington" , Richard Henderson Subject: Re: [Patch, AVR]: Fix PR46779 References: <4DF0FAB5.6070704@gjlay.de> <4DF11D20.4030907@gjlay.de> <4DF1ED76.4030507@gjlay.de> <4DF650B7.3030705@gjlay.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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-06/txt/msg01685.txt.bz2 Hans-Peter Nilsson schrieb: > On Mon, 13 Jun 2011, Georg-Johann Lay wrote: >> [In CCing Richard Henderson] >> Denis Chertykov schrieb: >>> 2011/6/10 Georg-Johann Lay : > >>>> Then I observed trouble with DI patterns during libgcc build and had >>>> to remove >>>> >>>> * "zero_extendqidi2" >>>> * "zero_extendhidi2" >>>> * "zero_extendsidi2" >>>> >>>> These are "orphan" insns: they deal with DI without having movdi >>>> support so I removed them. >>> This seems strange for me. >> As far as I know, to support a mode a respective mov insn is needed, > > For the record, not in general, just if you have patterns > operating on DImode. I.e. if you always have to call into > libgcc for every operation, you're fine with just SImode, as the > access will be split into SImode accesses. (That reload can't > split the access is arguably a wart.) For avr it's actually split in QImode (word_mode), SImode would be more efficient. > It's even documented, "node Standard Names" for mov@var{m}: > "If there are patterns accepting operands in larger modes, > @samp{mov@var{m}} must be defined for integer modes of those > sizes." Thanks for pointing that out. For avr that means: There is movsf pattern that is implemented less efficient than movsi. So removing movsf could improve code a bit. Besides efficiency, code for movsi and movsf can be the same on avr. >> which is >> not the case for DI. I don't know the exact rationale behind that >> (reloading?), > > Yes. (I ran into problems with this myself long ago.) So the zero_extend*di2 pattern are bogus because there is no movdi. >> just read is on gcc list by Ian Taylor (and also that it is >> stronly discouraged to have more than one mov insn per mode). > > That is correct. > >> So if the requirement to have mov insn is dropped and without the burden to >> implement movdi, it would be rather easy to implement adddi3 and subdi3 for >> avr... > > Resist the temptation... I see you did. :) The preferred handling is still that optabs cared for calling __adddi3 if there is no adddi3 pattern... The target would have to care for implementing __adddi3 so generic libgcc need not to be changed and IMO changing libgcc for that would not be adequate. Johann > brgds, H-P