Improve address calculations in riscv64
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(8 external files)
| Assignee | ||
Comment 1•4 months ago
|
||
To reduce the common code sequence when calling the existing
computeScaledAddress method.
Also directly add the offset if it doesn't fit into i12 load/store immediate.
Next parts will add more optimisations to this method.
| Assignee | ||
Comment 2•4 months ago
|
||
If the index is known to be zero, no shift/add instructions are needed.
Part 5 will pass zero index to this method.
| Assignee | ||
Comment 3•4 months ago
|
||
Reduce code duplication to split a value into two i12 immediates.
Part 4 will also call this new function.
| Assignee | ||
Comment 4•4 months ago
|
||
RISCV64 allows the following optimisation for address offset computations:
- If the offset fits into i12, directly pass to the load/store instruction.
- If the offset fits into two i12, add one half using
addiand pass the
other half to the load/store instruction. - If the offset can be split into high i20 and low i12, and adding the
low i12 can be performed through 64-bitadd, use load high i20 through
luiand pass low i12 to the load/store instruction. - Otherwise load the offset as
Imm32throughma_li.
| Assignee | ||
Comment 5•4 months ago
|
||
Port bug 1709863 to riscv64.
| Assignee | ||
Comment 6•4 months ago
|
||
| Assignee | ||
Comment 7•4 months ago
|
||
Port bug 1710087 to riscv64.
| Assignee | ||
Comment 8•4 months ago
|
||
Also add zero store optimisation to LWasmStoreI64.
Updated•4 months ago
|
Comment 10•4 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5cb83b2761ba
https://hg.mozilla.org/mozilla-central/rev/5efe9e258899
https://hg.mozilla.org/mozilla-central/rev/3453e6f1b549
https://hg.mozilla.org/mozilla-central/rev/a6d59f23f4ea
https://hg.mozilla.org/mozilla-central/rev/e6626976072d
https://hg.mozilla.org/mozilla-central/rev/fdc7797d7f3d
https://hg.mozilla.org/mozilla-central/rev/878b55833905
https://hg.mozilla.org/mozilla-central/rev/fbb5ff2bd27b
Updated•3 months ago
|
Description
•