loongarch64: fix return values from getcontext/swapcontext

master
Ariadne Conill 2024-08-07 20:28:53 -07:00
parent ed663cf0e5
commit e07c8d0ac5
2 changed files with 4 additions and 0 deletions

View File

@ -35,11 +35,14 @@ FUNC(libucontext_getcontext)
st.d $s8, $a0, REG_OFFSET(31)
st.d $a2, $a0, REG_OFFSET(3)
st.d $zero, $a0, REG_OFFSET(4)
st.d $a3, $a0, REG_OFFSET(22)
st.d $ra, $a0, REG_OFFSET(1)
st.d $ra, $a0, (MCONTEXT_PC)
move $a0, $zero
POP_FRAME(libucontext_getcontext)
jr $ra

View File

@ -39,6 +39,7 @@ FUNC(libucontext_swapcontext)
st.d $s8, $t5, REG_OFFSET(31)
st.d $a3, $t5, REG_OFFSET(3)
st.d $zero, $t5, REG_OFFSET(4)
st.d $a4, $t5, REG_OFFSET(22)
st.d $ra, $t5, REG_OFFSET(1)