mirror of
https://git.musl-libc.org/git/musl
synced 2025-10-05 21:12:41 +02:00
clone: align the given stack pointer on or1k and riscv
This was an oversight specific to these archs; others have always aligned the new stack pointer correctly.
This commit is contained in:
committed by
Rich Felker
parent
06c5e4e832
commit
5e03c03fcd
@@ -6,6 +6,8 @@
|
||||
.hidden __clone
|
||||
.type __clone,@function
|
||||
__clone:
|
||||
l.xori r11, r0, -4
|
||||
l.and r4, r4, r11
|
||||
l.addi r4, r4, -8
|
||||
l.sw 0(r4), r3
|
||||
l.sw 4(r4), r6
|
||||
|
@@ -8,6 +8,7 @@
|
||||
.type __clone, %function
|
||||
__clone:
|
||||
# Save func and arg to stack
|
||||
andi a1, a1, -16
|
||||
addi a1, a1, -16
|
||||
sw a0, 0(a1)
|
||||
sw a3, 4(a1)
|
||||
|
@@ -8,6 +8,7 @@
|
||||
.type __clone, %function
|
||||
__clone:
|
||||
# Save func and arg to stack
|
||||
andi a1, a1, -16
|
||||
addi a1, a1, -16
|
||||
sd a0, 0(a1)
|
||||
sd a3, 8(a1)
|
||||
|
Reference in New Issue
Block a user