The Alpha ABI requires the stack pointer to be 16-byte aligned.
However, __makecontext did not realign it after reserving space for
arguments. Depending on uc_stack.ss_size, this could leave the stack
only 8-byte aligned.
Round the new stack pointer down to a 16-byte boundary after reserving
the argument area.
This fixes stdlib/tst-makecontext2.
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
s8addq $1, 0, $2
subq $8, $2, $8
+ /* The Alpha ABI requires a 16-byte-aligned stack pointer. */
+ bic $8, 15, $8
+
/* Copy all parameters. Switch statement header here. */
ldah $3, $jumptable($29) !gprelhigh
cmple $18, 6, $1