public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: libffi-discuss@sourceware.org,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	       Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Subject: Re: [PATCH] Go closures for s390[x]
Date: Fri, 19 Dec 2014 14:10:00 -0000	[thread overview]
Message-ID: <549431B0.10806@redhat.com> (raw)
In-Reply-To: <201412191313.sBJDDb77031594@d03av02.boulder.ibm.com>

On 12/19/2014 07:13 AM, Ulrich Weigand wrote:
> Actually, it sort-of is; the code does:
>         la      %r14,0(%r13,%r9)                # Set return address
>         br      %r7                             # ... and call function
> 
> i.e. sets the return address register to point to one of the return stubs
> and then jumps to the target function instead of calling it; so from the
> point of view of an unwinder, it looks like the target function was called
> from the instruction immediately preceding the return stub.

Ah, good point.  That's the sort of verbage that should be in the comment then.

Is that optimization really worth it?  Is there no call/return prediction stack
to get confused?  I know I replicated it in the code that I wrote, but really
only now do I start to question it.


r~

  reply	other threads:[~2014-12-19 14:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 15:05 Dominik Vogt
2014-12-18 21:29 ` Richard Henderson
2014-12-19 13:13   ` Ulrich Weigand
2014-12-19 14:10     ` Richard Henderson [this message]
2014-12-19 14:48       ` Ulrich Weigand
2014-12-22 10:27   ` Dominik Vogt
2014-12-22 16:31     ` Richard Henderson

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=549431B0.10806@redhat.com \
    --to=rth@redhat.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=krebbel@linux.vnet.ibm.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=uweigand@de.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).