[llvm-dev] Unaligned Stack Pointer

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 17 15:46:49 PDT 2020


On Thu, Sep 17, 2020 at 11:17:03AM -0400, David Jones via llvm-dev wrote:
> SPARC is a good example. If an interrupt occurs, the OS must flush all
> register windows out to the user stack.  This requires that the stack
> pointer be aligned.  Since you have no control over when an interrupt can
> occur. you must maintain alignment at all times.

The kernel will realign the stack pointer as appropiate for signal
handlers, so that argument doesn't really work. Interrupt and exception
handlers normally have their own stacks, so the problem doesn't apply to
them.

Joerg


More information about the llvm-dev mailing list