public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: rth@redhat.com (Richard Henderson)
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
Subject: Re: [PATCH 0/4] s390 improvements
Date: Fri, 19 Dec 2014 17:08:00 -0000	[thread overview]
Message-ID: <201412191708.sBJH8jH9024006@d03av02.boulder.ibm.com> (raw)
In-Reply-To: <54945449.5010403@redhat.com> from "Richard Henderson" at Dec 19, 2014 10:37:29 AM

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

  reply	other threads:[~2014-12-19 17:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 21:33 Richard Henderson
2014-12-18 21:33 ` [PATCH 2/4] s390: Avoid aliasing warnings Richard Henderson
2014-12-18 21:33 ` [PATCH 4/4] s390: Use pc-relative insns in 31-bit mode Richard Henderson
2014-12-18 21:33 ` [PATCH 1/4] s390: Kill trailing whitespace Richard Henderson
2014-12-18 21:33 ` [PATCH 3/4] s390: Reorganize assembly Richard Henderson
2014-12-22 12:12   ` Dominik Vogt
2014-12-22 12:25     ` Dominik Vogt
2014-12-22 16:30       ` Richard Henderson
2014-12-23  9:54         ` Dominik Vogt
2014-12-19 15:07 ` [PATCH 0/4] s390 improvements Ulrich Weigand
2014-12-19 15:33   ` Richard Henderson
2014-12-19 16:15     ` Ulrich Weigand
2014-12-19 16:37       ` Richard Henderson
2014-12-19 17:08         ` Ulrich Weigand [this message]
2014-12-19 16:43 ` [PATCH 5/4] s390: Inline and tidy ffi_prep_args Richard Henderson
2014-12-22 11:34 ` [PATCH 0/4] s390 improvements Dominik Vogt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201412191708.sBJH8jH9024006@d03av02.boulder.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=krebbel@linux.vnet.ibm.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=rth@redhat.com \
    --cc=rth@twiddle.net \
    --cc=vogt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).