Closed Bug 1995491 Opened 1 year ago Closed 1 year ago

Use standard unboxing methods in loadInt32OrDouble on riscv64

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(4 external files)

No description provided.

slli isn't needed when MaxBits - (pos + size) is zero. This case happens
when extractTag calls ExtractBits.

Drive-by change:

  • Merge code paths for JS_CODEGEN_RISCV64 and JS_CODEGEN_RISCV32.

LoadFixedSlotT was compiled to:

ld        t4, 24(t0)
srli      t4, t4, 47
lui       t5, 0x20
addiw     t5, t5, -15
beq       t4, t5, 0 -> notInt32
auipc     t5, 0x0
jr        t5
ld        t4, 24(t0)
fcvt.d.w  ft0, t4
j         0 -> end
fld       ft0, 24(t0)

It's now compiled to:

ld        t4, 24(t0)
srli      t4, t4, 47
lui       t5, 0x20
addiw     t5, t5, -15
bne       t4, t5, 0 -> notInt32
lw        t4, 24(t0)
fcvt.d.w  ft0, t4
j         0 -> end
fld       ft0, 24(t0)

Also perform the same changes for mips64.

Call the Address overload to use the improvements from the previous part. Also
include BaseIndex::offset in the scaled Address.

Note: This method isn't currently used (, but needs to be present because it's
called from template code).

Severity: -- → N/A
Priority: -- → P3
Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/66d5a654c006 https://hg.mozilla.org/integration/autoland/rev/97b17f05e866 Part 1: Avoid unnecessary shift in ExtractBits. r=spidermonkey-reviewers,iain https://github.com/mozilla-firefox/firefox/commit/b5cc60f342c3 https://hg.mozilla.org/integration/autoland/rev/c4ef21788d93 Part 2: Use standard unboxing methods in loadInt32OrDouble. r=spidermonkey-reviewers,iain https://github.com/mozilla-firefox/firefox/commit/7de83b45c326 https://hg.mozilla.org/integration/autoland/rev/01c37beab33d Part 3: Call Address-based loadInt32OrDouble method. r=spidermonkey-reviewers,iain https://github.com/mozilla-firefox/firefox/commit/6276b3a03fb6 https://hg.mozilla.org/integration/autoland/rev/8c44b848487a Part 4: Remove unnecessary Address copying. r=spidermonkey-reviewers,iain
QA Whiteboard: [qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: