Save caller frame pointer in Wasm JitEntry stub
Categories
(Core :: JavaScript Engine: JIT, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(3 files)
Before we can add a frame pointer to Warp frames, we need to fix Wasm's JitEntry stub to not clobber the frame pointer. It currently does fp := sp
in its prologue to make stack unwinding work.
Assignee | ||
Comment 1•2 years ago
|
||
A later patch will add an offsets
argument to save the return offset.
Assignee | ||
Comment 2•2 years ago
|
||
The JitEntry stub is also used for calls from JS Baseline Interpreter/JIT code.
Depends on D148485
Assignee | ||
Comment 3•2 years ago
|
||
The JitEntry stub clobbers the FP register in the prologue (to make stack unwinding work).
We need to change it to restore FP to allow adding frame pointers to Warp frames.
This patch changes the prologue to the standard frame prologue, and the epilogue
now stores the return offset to let the profiler correctly handle the instructions
between popping FP and returning.
ARM64 adds some complexity because the JIT ABI aligns the stack at the return address,
so we need to add a padding word to maintain 16-byte stack alignment. When we add the
callerFP
to JitFrameLayout
(similar to wasm::Frame
) we can hopefully simplify this
a bit.
Depends on D148486
Comment 5•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6d3766652a6a
https://hg.mozilla.org/mozilla-central/rev/fa2fcbc1942c
https://hg.mozilla.org/mozilla-central/rev/e32ea06d4f36
Description
•