[PATCH] alpha: Align stack for alpha
Collin Funk
collin.funk1@gmail.com
Sat Sep 6 23:05:57 GMT 2025
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> As done already for x86_64 [1] and aarch64 [2]. It fixes
> misc/tst-misalign-clone on alpha.
>
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27902
> [2] https://sourceware.org/bugzilla/show_bug.cgi?id=27939
> ---
> sysdeps/unix/sysv/linux/alpha/clone.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
> index 727346f8b1..f7d464fc9e 100644
> --- a/sysdeps/unix/sysv/linux/alpha/clone.S
> +++ b/sysdeps/unix/sysv/linux/alpha/clone.S
> @@ -49,6 +49,8 @@ __clone:
> /* Sanity check arguments. */
> ldiq v0, EINVAL
> beq a0, SYSCALL_ERROR_LABEL /* no NULL function pointers */
> + /* Align stack. */
> + bic a1, 15, a1
> beq a1, SYSCALL_ERROR_LABEL /* no NULL stack pointers */
>
> /* Save the fn ptr and arg on the new stack. */
Looks good, thanks.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Collin
More information about the Libc-alpha
mailing list