Files
rtems/bsps
Sebastian Huber 232ddda74e bsps/i386: Align the interrupt frame for fxsave
The SSE part of the interrupt prologue saves the unit state with
fxsave, which faults with a general protection exception unless its
operand is 16 byte aligned.  FRM_SIZ is a multiple of 16, so subtracting
it keeps the alignment of the interrupted stack pointer without
establishing it, and the stack pointer of an interrupted context is not
necessarily aligned.  The stack is aligned further down for the C calls,
which is after the fxsave.

Align the frame right after it is allocated.  The original stack pointer
is already in eax at that point and is stored to ESP_OFF as before, so
the epilogue is unchanged.

This affects the BSP variants built with SSE.  Without it psxfenv01
terminates with an exception on pc586-sse as soon as it raises a
floating point exception.

Update #5696.

Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-08-20 18:04:24 -05:00
..
…
2026-08-19 11:43:52 -05:00
…
…