Share code to set-up prologue for GenerateCallablePrologue and GenerateJitEntryPrologue
Categories
(Core :: JavaScript: WebAssembly, enhancement)
Tracking
()
| 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.
| Assignee | ||
Comment 1•3 months ago
|
||
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
Updated•2 months ago
|
Description
•