| Summary: | We need to load the baseline JIT's constant pool register after OSR exit to checkpoints if we return to baseline code | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, tzagallo, webkit-bug-importer, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Saam Barati
2021-09-29 11:41:53 PDT
Created attachment 439635 [details]
patch
Comment on attachment 439635 [details]
patch
r=me
Comment on attachment 439635 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=439635&action=review r=me too > Source/JavaScriptCore/llint/LowLevelInterpreter.asm:2501 > +macro loadBaselineJITConstantPool() > + # Baseline uses LLInt's PB register for its JIT constant pool. > + loadp CodeBlock[cfr], PB > + loadp CodeBlock::m_jitData[PB], PB > + loadp CodeBlock::JITData::m_jitConstantPool[PB], PB > +end > + > +macro setupReturnToBaselineAfterCheckpointExitIfNeeded() > + # DFG or FTL OSR exit could have compiled an OSR exit to LLInt code. > + # That means it set up registers as if execution would happen in the > + # LLInt. However, during OSR exit for checkpoints, we might return to > + # JIT code if it's already compiled. After the OSR exit gets compiled, > + # we can tier up to JIT code. And checkpoint exit will jump to it. > + # That means we always need to set up our constant pool GPR, because the OSR > + # exit code might not have done it. > + bpneq r0, 1, .notBaselineJIT > + loadBaselineJITConstantPool() > +.notBaselineJIT: We need to have `if JIT` thing before accessing to CodeBlock::m_jitData to ensure that LLInt without JIT configuration works. (Not using CLoop, but not using JIT). Created attachment 439644 [details]
patch for landing
Committed r283288 (242315@main): <https://commits.webkit.org/242315@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439644 [details]. |