From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12955 invoked by alias); 16 Jun 2011 09:45:16 -0000 Received: (qmail 12947 invoked by uid 22791); 16 Jun 2011 09:45:16 -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_CL X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 09:44:57 +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 (fruni mo1) (RZmta 25.18) with ESMTPA id e05636n5G8X51t ; Thu, 16 Jun 2011 11:37:22 +0200 (MEST) Message-ID: <4DF9CED0.6070104@gjlay.de> Date: Thu, 16 Jun 2011 10:00:00 -0000 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Denis Chertykov CC: gcc-patches@gcc.gnu.org, "Eric B. Weddington" , Anatoly Sokolov Subject: Re: [Patch, AVR]: PR49313, fix PR29524 References: <4DF87FAD.4090104@gjlay.de> In-Reply-To: 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-06/txt/msg01227.txt.bz2 Denis Chertykov schrieb: > 2011/6/15 Georg-Johann Lay : >> This is a patch that implements some libgcc functions in assembler. >> The functions are used only very seldom but if, they lead to an >> unpleasant waste of resource. For example, some SF functions >> eventually lead to __clz_tab being dragged in (PR29524). >> >> This patch avoids that by straight forward assembler implementation of >> functions that are easy to implement. >> >> Tested without regression. Moreover, I tested functions in some >> self-written code against the old C-implementation. HI/QI functions >> tested for all possible inputs. >> > > Approved for AVR. > May be you need another approval for longlong.h > > Denis. Committed original Version from http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01200.html together with the following corrigendum: --- config/avr/libgcc.S (Revision 175097) +++ config/avr/libgcc.S (Arbeitskopie) @@ -1241,7 +1241,7 @@ ENDF __bswapdi2 ;; r25:r18 = ashr64 (r25:r18, r17:r16) DEFUN __ashrdi3 push r16 - andi r16, 31 + andi r16, 63 breq 2f 1: asr r25 ror r24 @@ -1263,7 +1263,7 @@ ENDF __ashrdi3 ;; r25:r18 = lshr64 (r25:r18, r17:r16) DEFUN __lshrdi3 push r16 - andi r16, 31 + andi r16, 63 breq 2f 1: lsr r25 ror r24 @@ -1285,7 +1285,7 @@ ENDF __lshrdi3 ;; r25:r18 = ashl64 (r25:r18, r17:r16) DEFUN __ashldi3 push r16 - andi r16, 31 + andi r16, 63 breq 2f 1: lsl r18 rol r19 Johann