Fix various issues about missing veneer pool blocks for riscv64
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(10 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Comment 1•3 months ago
|
||
Replace BlockTrampolinePoolScope with AutoForbidPoolsAndNops, copying the
comments from the ARM64 code. Using the same name as ARM32/64 allows to share
more code and the name "trampoline" is actually V8-specific, so it seems
better to use the SpiderMonkey-specific nomenclature.
Also starts adding missing AutoForbidPoolsAndNops and AutoForbidNops, but
more come in later parts.
| Assignee | ||
Comment 2•3 months ago
|
||
Clean-ups:
- Adds
BaseIndexoverloads to the load and store methods. - Removes the duplicate
ma_fld_{s,d}andma_fst_{s,d}copied from LoongArch64,
so there's now onlyma_load{Float,Double}andma_store{Float,Double}. - And align with integer load/store methods to use
computeScaledAddressinstead
ofcomputeEffectiveAddress.
Fixes:
- Add
AutoForbidPoolsAndNopsdirectly before the load/store instruction so that
currentOffset()returns the proper offset. Without it veneer pools can be
inserted before the load/store instruction.
| Assignee | ||
Comment 3•3 months ago
|
||
This matches the ARM64 code and using ma_{load,store} resp. ma_{load,store}{Float,Double}
will ensure the correct FaultingCodeOffset is used.
Note: The missing AutoForbidPoolsAndNops for ma_{load,store} are added in part 4.
| Assignee | ||
Comment 4•3 months ago
|
||
Add AutoForbidPoolsAndNops to ensure no veneer pools are added, otherwise
the offset from currentOffset() can be incorrect.
| Assignee | ||
Comment 5•3 months ago
|
||
Veneer pools may still get inserted within the atomic code sequences, but at
least now currentOffset() is correctly computed.
| Assignee | ||
Comment 6•3 months ago
|
||
Calling nextOffset() without blocking pools may not return the correct offset
if veneers get added. Change writeDataRelocation to accept the actual offset
as BufferOffset resp. CodeOffset.
| Assignee | ||
Comment 7•3 months ago
|
||
Return the buffer offset to avoid adding AutoForbidPoolsAndNops before
calling currentOffset() resp. nextOffset().
| Assignee | ||
Comment 8•3 months ago
|
||
Also move AutoForbidPoolsAndNops into ma_liPatchable to avoid some code
duplication and to make it easier to see that all instructions are placed next
to each other.
As a side-effect, this also fixes some missing AutoForbidPoolsAndNops.
| Assignee | ||
Comment 9•3 months ago
|
||
Updates the remaining BlockTrampolinePoolScope to use AutoForbidPoolsAndNops. Also
adds more missing AutoForbidPoolsAndNops and adds some comments.
| Assignee | ||
Comment 10•3 months ago
|
||
Call the buffer align method to ensure no buffer nops are inserted.
Updated•3 months ago
|
Comment 11•3 months ago
|
||
Comment 12•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e6dbaf82a3c6
https://hg.mozilla.org/mozilla-central/rev/71535c539ee9
https://hg.mozilla.org/mozilla-central/rev/d15335e5624c
https://hg.mozilla.org/mozilla-central/rev/7132b24ea307
https://hg.mozilla.org/mozilla-central/rev/54e1ca27a9a9
https://hg.mozilla.org/mozilla-central/rev/b5b21b945184
https://hg.mozilla.org/mozilla-central/rev/2f6b15b5d0cd
https://hg.mozilla.org/mozilla-central/rev/622ac2d3a919
https://hg.mozilla.org/mozilla-central/rev/3a453b617e14
https://hg.mozilla.org/mozilla-central/rev/ce76fd62b122
https://hg.mozilla.org/mozilla-central/rev/878336a0a8b7
Updated•2 months ago
|
Description
•