Closed Bug 1527274 Opened 7 years ago Closed 5 years ago

Fix stack misalignment issues caused by 3-word size of wasm::Frame

Categories

(Core :: JavaScript: WebAssembly, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED

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.

Changing the frame size to 4 words exposes the bug described in bug 1518785.

Depends on: 1518785
Priority: -- → P3

Luke is talking about taking the size down to two words instead, but we'll leave this opn for now anyway.

Depends on: 1599722

This is either P2 or fixed, so let's bump it.

Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Priority: P3 → P2

wasm::Frame has size 2 words.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.