summaryrefslogtreecommitdiff
path: root/src/thread/or1k/clone.s
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/or1k/clone.s
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/or1k/clone.s')
-rw-r--r--src/thread/or1k/clone.s2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/thread/or1k/clone.s b/src/thread/or1k/clone.s
index 2473ac20..9a84aeba 100644
--- a/src/thread/or1k/clone.s
+++ b/src/thread/or1k/clone.s
@@ -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