...
Created attachment 260333 [details] Patch
Created attachment 260334 [details] Patch
Created attachment 260335 [details] Patch
Comment on attachment 260335 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=260335&action=review > Source/JavaScriptCore/ftl/FTLJSCall.cpp:59 > + jit.addPtr(CCallHelpers::TrustedImm32(sizeof(void*) - static_cast<int64_t>(stackSize)), CCallHelpers::framePointerRegister, CCallHelpers::stackPointerRegister); Why the "-" here?
(In reply to comment #4) > Comment on attachment 260335 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=260335&action=review > > > Source/JavaScriptCore/ftl/FTLJSCall.cpp:59 > > + jit.addPtr(CCallHelpers::TrustedImm32(sizeof(void*) - static_cast<int64_t>(stackSize)), CCallHelpers::framePointerRegister, CCallHelpers::stackPointerRegister); > > Why the "-" here? I think what I'm more curious about is why are we not subtracting the entire stack size, but subtracting stack size minus 8 bytes
(In reply to comment #5) > (In reply to comment #4) > > Comment on attachment 260335 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=260335&action=review > > > > > Source/JavaScriptCore/ftl/FTLJSCall.cpp:59 > > > + jit.addPtr(CCallHelpers::TrustedImm32(sizeof(void*) - static_cast<int64_t>(stackSize)), CCallHelpers::framePointerRegister, CCallHelpers::stackPointerRegister); > > > > Why the "-" here? > I think what I'm more curious about is why are we not subtracting > the entire stack size, but subtracting stack size minus 8 bytes What LLVM calls the stack size is the amount of stack space that the function will use. This does include saving of the frame pointer, which is saved above the actual frame. You just made me realize that this is a bug on ARM64 however, since we save the link register in the actual frame, in addition to the frame pointer. This should have crashed almost everything, I wonder why we don't see it happening...
Comment on attachment 260335 [details] Patch r- because of the bug Saam and Basile noticed.
Created attachment 260384 [details] Patch
Created attachment 260452 [details] Patch
Comment on attachment 260452 [details] Patch This is the wrong patch.
Comment on attachment 260452 [details] Patch Actually, I don't know how to read, and this is the right patch.
Comment on attachment 260452 [details] Patch r=me
Committed r189325: <http://trac.webkit.org/changeset/189325>