From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8864 invoked by alias); 23 Dec 2014 09:54:45 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 8853 invoked by uid 89); 23 Dec 2014 09:54:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com Received: from e06smtp17.uk.ibm.com (HELO e06smtp17.uk.ibm.com) (195.75.94.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 23 Dec 2014 09:54:44 +0000 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Dec 2014 09:54:40 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 23 Dec 2014 09:54:39 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id AC90F17D8056 for ; Tue, 23 Dec 2014 09:55:06 +0000 (GMT) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBN9scg248693390 for ; Tue, 23 Dec 2014 09:54:38 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBN9scvf031939 for ; Tue, 23 Dec 2014 04:54:38 -0500 Received: from bl3ahm9f.de.ibm.com (sig-9-84-11-112.evts.de.ibm.com [9.84.11.112]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sBN9sbBq031901 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 23 Dec 2014 04:54:38 -0500 Received: from dvogt by bl3ahm9f.de.ibm.com with local (Exim 4.76) (envelope-from ) id 1Y3MAp-0002Bk-Jh; Tue, 23 Dec 2014 10:54:39 +0100 Date: Tue, 23 Dec 2014 09:54:00 -0000 From: Dominik Vogt To: libffi-discuss@sourceware.org Subject: Re: [PATCH 3/4] s390: Reorganize assembly Message-ID: <20141223095439.GA4745@linux.vnet.ibm.com> Reply-To: libffi-discuss@sourceware.org Mail-Followup-To: libffi-discuss@sourceware.org References: <1418938403-15836-1-git-send-email-rth@twiddle.net> <1418938403-15836-4-git-send-email-rth@twiddle.net> <20141222121250.GA25775@linux.vnet.ibm.com> <20141222122517.GA30481@linux.vnet.ibm.com> <54984712.2050609@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54984712.2050609@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14122309-0029-0000-0000-0000025310E3 X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00286.txt.bz2 On Mon, Dec 22, 2014 at 08:30:10AM -0800, Richard Henderson wrote: > On 12/22/2014 04:25 AM, Dominik Vogt wrote: > > Or rather the attached patch stat replaces > > > > stm %r2,%r3,0(%r12) > > nop > > > > with > > > > st %r2,0(%r12) > > st %r3,4(%r12) > > Is that really an improvement? > > (1) You now need a branch for the (presumed) normal "int" case. Well, depends on whether we talk about 64 bit or 31 bit: 64 bit ------ + saves decoding two nop instructions for int64_t + saves four bytes 31 bit ------ + saves decoding two nop instructions for int64_t - replaces a nop with a jump instruction for int32_t Of course one could have a different order of types depending on the platform to eliminate the disadvantage of the 31 bit case. > (2) Is stm really that much faster than two st? I would have > thought the reverse, actually. No, stm+nop is potentially slower than two st. That's why the patch uses the two st instructions. P.S.: Just noticed there's a duplicate ".balign" in the patched code. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany