The other tiers now save and restore callee save registers. The FTL's processing of callee saves for OSR entry, OSR exit and exception unwinding needs to be integrated with the other tiers.
Created attachment 259733 [details] Patch
Comment on attachment 259733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259733&action=review > Source/JavaScriptCore/ChangeLog:8 > + Turned off register preservation thunks for outgoing calls from FTL gerneated code. gerneated -> generated > Source/JavaScriptCore/ChangeLog:10 > + Fxed the FTL OSR exit compiler to restore the callee saves from an FTL funcion to funcion -> function > Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:392 > + GPRReg regToLoad = baselineRegisterOffset ? GPRInfo::regT0 : reg.gpr(); Why not just always use reg.gpr()? > Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:418 > + if (reg.isLocal() && reg.toLocal() < static_cast<int>(baselineVirtualRegistersForCalleeSaves)) Can this actually happen?
(In reply to comment #2) > Comment on attachment 259733 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259733&action=review > > > Source/JavaScriptCore/ChangeLog:8 > > + Turned off register preservation thunks for outgoing calls from FTL gerneated code. > > gerneated -> generated Fixed. > > Source/JavaScriptCore/ChangeLog:10 > > + Fxed the FTL OSR exit compiler to restore the callee saves from an FTL funcion to > > funcion -> function Fixed. > > Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:392 > > + GPRReg regToLoad = baselineRegisterOffset ? GPRInfo::regT0 : reg.gpr(); > > Why not just always use reg.gpr()? Changed. > > Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:418 > > + if (reg.isLocal() && reg.toLocal() < static_cast<int>(baselineVirtualRegistersForCalleeSaves)) > > Can this actually happen? Yes. The FTL sets those values to undefined.
Created attachment 259887 [details] Updated patch including fix for exceptions thrown from the FTL.
Comment on attachment 259887 [details] Updated patch including fix for exceptions thrown from the FTL. View in context: https://bugs.webkit.org/attachment.cgi?id=259887&action=review r=me > Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:417 > + dataLogF("Got a local that collided with BL callee saves\n"); Revert this.
Committed r188986: <http://trac.webkit.org/changeset/188986>
*** This bug has been marked as a duplicate of bug 148666 ***
Comment on attachment 259887 [details] Updated patch including fix for exceptions thrown from the FTL. Cleared review? from attachment 259887 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).