Closed
Bug 1987693
Opened 1 year ago
Closed 1 year ago
riscv64: Unify 32b-to-64b int sign extension to using SignExtendWord
Categories
(Core :: JavaScript Engine: JIT, task, P5)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
144 Branch
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: csmantle, Assigned: csmantle)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Currently many equivalent instructions are used in riscv64 backend for 32b-to-64b sign extension, like slliw rx, ry, 0. However, the ISA spec recommends the usage of addiw rx, ry, 0 as a sign extension instruction, and even defines a pseudoinstruction sext.w for it:
Note, ADDIW rd, rs1, 0 writes the sign extension of the lower 32 bits of register rs1 into register rd (assembler pseudoinstruction SEXT.W).
-- https://riscv.github.io/riscv-isa-manual/snapshot/unprivileged/#norm:inst:addiw:operation
And we already have a MacroAssemblerRiscv64Compat::SignExtendWord defined for it. Using this to perform sign extension would make this operation look uniform in disassembly.
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Assignee: nobody → webmaster
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Updated•1 year ago
|
Pushed by jdemooij@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/f38a74b508e2
https://hg.mozilla.org/integration/autoland/rev/44ad01563397
[riscv64] Use MacroAssemblerRiscv64Compat::SignExtendWord for 32b-to-64b sign extension. r=jandem
Comment 3•1 year ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox144:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
Updated•1 year ago
|
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in
before you can comment on or make changes to this bug.
Description
•