[PATCH] Go closures for s390[x]

Richard Henderson rth@redhat.com
Fri Dec 19 14:10:00 GMT 2014


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~



More information about the Libffi-discuss mailing list