From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9881 invoked by alias); 19 Dec 2014 17:08:54 -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 9871 invoked by uid 89); 19 Dec 2014 17:08:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e31.co.us.ibm.com Received: from e31.co.us.ibm.com (HELO e31.co.us.ibm.com) (32.97.110.149) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 19 Dec 2014 17:08:52 +0000 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Dec 2014 10:08:50 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Dec 2014 10:08:49 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id DF1D13E40044 for ; Fri, 19 Dec 2014 10:08:48 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBJH8mfx32112878 for ; Fri, 19 Dec 2014 10:08:48 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBJH8mru024289 for ; Fri, 19 Dec 2014 10:08:48 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id sBJH8jH9024006; Fri, 19 Dec 2014 10:08:45 -0700 Message-Id: <201412191708.sBJH8jH9024006@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 19 Dec 2014 18:08:44 +0100 Subject: Re: [PATCH 0/4] s390 improvements To: rth@redhat.com (Richard Henderson) Date: Fri, 19 Dec 2014 17:08:00 -0000 From: "Ulrich Weigand" Cc: rth@twiddle.net (Richard Henderson), libffi-discuss@sourceware.org, Ulrich.Weigand@de.ibm.com, vogt@linux.vnet.ibm.com, krebbel@linux.vnet.ibm.com In-Reply-To: <54945449.5010403@redhat.com> from "Richard Henderson" at Dec 19, 2014 10:37:29 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14121917-8236-0000-0000-000007EE3112 X-SW-Source: 2014/txt/msg00278.txt.bz2 Richard Henderson wrote: > On 12/19/2014 10:14 AM, Ulrich Weigand wrote: > > In the end, it's probably OK for low-level code like libffi to make certain > > assumptions on the behavior of the toolchain. I'm not quite sure whether > > this actually gets us any significant benefit in this case. Does it really > > matter whether ffi_prep_args is called from ffi_call_int vs. ffi_call_SYSV? > > I think it's the indirect call back to ffi_prep_args that I find ugliest, > and for most targets, totally unnecessary. Ah, OK. Yes, there's no need for the call to be indirect. I guess in the original implementation on old S/390, there's no real difference between a direct and an indirect call, but where we have brasl, we should really use it and do a direct call. > >> It's true that the load of %r15 is now a nop. It hadn't been at one point in > >> my development; ffi_prep_args had had more than 5 parameters, and so there was > >> extra stack allocated. I suppose if ffi_prep_args were inlined, one could be > >> certain of this (since there will be no function calls) and document it as such. > > > > If we do use such tricks, this version may actually be preferable. > > I'll post that version shortly. If you still don't like it, then I'll > try another tack whereby we simply avoid the indirect call. I guess the new version is fine with me. Thanks for working on this! Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com