summaryrefslogtreecommitdiff
path: root/src/thread/riscv64
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-02-08 05:39:59 +0100
committerRich Felker <dalias@aerifal.cx>2025-02-21 19:56:28 -0500
commit5e03c03fcde3534b37a0b995a438cd176d6882d3 (patch)
treed518e50885df2ac31337fec4fbe9589c04460f37 /src/thread/riscv64
parent06c5e4e832f4796be02c743270fb554f978de02c (diff)
downloadmusl-5e03c03fcde3534b37a0b995a438cd176d6882d3.tar.gz
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.
Diffstat (limited to 'src/thread/riscv64')
-rw-r--r--src/thread/riscv64/clone.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/riscv64/clone.s b/src/thread/riscv64/clone.s
index db908248..0e6f41a8 100644
--- a/src/thread/riscv64/clone.s
+++ b/src/thread/riscv64/clone.s
@@ -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)