This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Go closures for s390[x]


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]