Closed Bug 2056877 Opened 3 months ago Closed 3 months ago

Share code to set-up prologue for GenerateCallablePrologue and GenerateJitEntryPrologue

Categories

(Core :: JavaScript: WebAssembly, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

For all architectures except ARM64, GenerateCallablePrologue and GenerateJitEntryPrologue emitted the same code to set-up the prologue, but confusingly used different MacroAssembler methods to make it more difficult to see that the same instructions are emitted.

Move the code to create the prologue into GenerateCommonPrologue and call that function from GenerateCallablePrologue and GenerateJitEntryPrologue.

Additionally for RISCV64, emit a smaller instruction sequence to create the prologue, matching what's used by Clang/GCC.

For all architectures except ARM64, GenerateCallablePrologue and
GenerateJitEntryPrologue emitted the same code to set-up the prologue, but
confusingly used different MacroAssembler methods to make it more difficult
to see that the same instructions are emitted.

Move the code to create the prologue into GenerateCommonPrologue and call
that function from GenerateCallablePrologue and GenerateJitEntryPrologue.

Additionally for RISCV64, emit a smaller instruction sequence to create the
prologue, matching what's used by Clang/GCC.

Before:

addi      sp, sp, -8
sd        ra, 0(sp)
addi      sp, sp, -8
sd        fp, 0(sp)
mv        fp, sp

After:

addi      sp, sp, -16
sd        ra, 8(sp)
sd        fp, 0(sp)
mv        fp, sp
Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/d122bda56578 https://hg.mozilla.org/integration/autoland/rev/7386f182252d Share code to set-up prologue for GenerateCallablePrologue and GenerateJitEntryPrologue. r=spidermonkey-reviewers,jandem
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: