mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 14:30:06 +00:00
ARC: align child stack in clone
The ARCv2 ABI requires 4 byte stack pointer alignment. Don't allow to use unaligned child stack in clone. As the stack grows down, align it down. This was pointed by misc/tst-misalign-clone-internal and misc/tst-misalign-clone tests. Stack alignmet fixes these tests fails. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
a9b3b770f5
commit
87abcf9a6e
@ -41,6 +41,7 @@
|
||||
|
||||
ENTRY (__clone)
|
||||
cmp r0, 0 /* @fn can't be NULL. */
|
||||
and r1,r1,-4 /* @child_stack be 4 bytes aligned per ABI. */
|
||||
cmp.ne r1, 0 /* @child_stack can't be NULL. */
|
||||
bz L (__sys_err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user