Use div+mod sequence on risc64
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(2 external files)
From https://riscv.github.io/riscv-isa-manual/snapshot/unprivileged/#_division_operations:
If both the quotient and remainder are required from the same division, the recommended code sequence is:
DIV[U] rdq, rs1, rs2; REM[U] rdr, rs1, rs2(rdqcannot be the same asrs1orrs2). Microarchitectures can then fuse these into a single divide operation instead of performing two separate divides.
| Assignee | ||
Comment 1•1 year ago
|
||
From https://riscv.github.io/riscv-isa-manual/snapshot/unprivileged/#_division_operations:
If both the quotient and remainder are required from the same division, the
recommended code sequence is:DIV[U] rdq, rs1, rs2; REM[U] rdr, rs1, rs2
(rdqcannot be the same asrs1orrs2). Microarchitectures can then
fuse these into a single divide operation instead of performing two separate
divides.
| Assignee | ||
Comment 2•1 year ago
|
||
The name ma_div_branch_overflow is misleading, because there's no "overflow".
Inlining the method also makes it easier to use the recommended div-mod
sequence on riscv64.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5b73a2ab4c5e
https://hg.mozilla.org/mozilla-central/rev/2982d494fd3c
Updated•1 year ago
|
Description
•