Fix stack misalignment issues caused by 3-word size of wasm::Frame
Categories
(Core :: JavaScript: WebAssembly, enhancement, P2)
Tracking
()
People
(Reporter: jseward, Assigned: lth)
References
Details
Currently wasm::Frame has a size of 3 words except on arm64 and mips(64?).
This has the inevitable effect that the spill/work area immediately below the
Frame, as it is used by at least the baseline compiler, can often be only
singleword-aligned. On 32 bit targets that's particularly bad as we could
wind up spilling 8-byte floats to a 4-byte aligned address. And if we want to
do SIMD in future we'll need to have at least 16-aligned spill slots
available.
One, but not necessarily the only, proposed fix is to make wasm::Frame have 4
words on all targets.
Really though, a good solution to this will require further study of frame
layouts and in particular the interactions of the various alignment shims that
are inserted by the various compilers.
| Reporter | ||
Comment 1•7 years ago
|
||
Changing the frame size to 4 words exposes the bug described in bug 1518785.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
Luke is talking about taking the size down to two words instead, but we'll leave this opn for now anyway.
| Assignee | ||
Comment 3•5 years ago
|
||
This is either P2 or fixed, so let's bump it.
| Assignee | ||
Comment 4•5 years ago
|
||
wasm::Frame has size 2 words.
Description
•