[Webkit-unassigned] [Bug 146846] jsc-tailcall: JavaScript functions should restore the stack pointer after a call

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 13 12:52:58 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146846

--- Comment #2 from Basile Clement <basile_clement at apple.com> ---
(In reply to comment #1)
> Created attachment 256709 [details]
> Patch using StackMap size
> 
> This uses the stackmap size from LLVM to restore the stack pointer to where
> it should be in the patchpoint. I am interested in hearing opinions on the
> following two points:
> 
>  - We may want to adapt the default patchpoint size to accommodate the
> additional lea opcode.
> 
>  - LLVM provides a stackmap/stackrestore intrinsic that we should be able to
> use. I am unsure what guarantees we would have with this; in particular, I
> fear LLVM spilling values onto the stack before the call but after saving
> the stack pointer, performing the call, then trying to restore those values
> using the stack pointer as it is supposed to be callee-save. I did not see
> this happen even when testing that approach with high register pressure
> (LLVM ends up using bp-based offsets for the spilling), but again, I am
> unsure how much we can rely on this. I believe messing up with the stack
> pointer in the patchpoint is better because it makes it completely
> transparent to LLVM.

After talking offline with fpizlo, the stackmap size approach looks like the best one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150713/3c3db849/attachment.html>


More information about the webkit-unassigned mailing list