loongarch64 __clone: align stack pointer mod 16

According to LoongArch ABI Specs, stack need to be 16 align to improve
performance and compiler layout of stack frames.
This commit is contained in:
wanghongliang 2024-02-26 02:12:28 +08:00 committed by Rich Felker
parent ec325b3828
commit 80e3b09823
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@
.hidden __clone
.type __clone,@function
__clone:
bstrins.d $a1, $zero, 3, 0 #stack to 16 align
# Save function pointer and argument pointer on new thread stack
addi.d $a1, $a1, -16
st.d $a0, $a1, 0 # save function pointer