riscv32: fix getcontext/swapcontext return value
ci/woodpecker/push/woodpecker Pipeline was successful Details

master
Ariadne Conill 2024-08-07 19:19:29 -07:00
parent e603fd7239
commit c2a8b0a9d5
2 changed files with 5 additions and 4 deletions

View File

@ -25,8 +25,8 @@ FUNC(libucontext_getcontext)
sw s1, REG_OFFSET(REG_S1)(a0)
/* return register block */
sw a0, REG_OFFSET(REG_A0)(a0)
sw a1, REG_OFFSET(REG_A1)(a0)
sw x0, REG_OFFSET(REG_A0)(a0)
sw x0, REG_OFFSET(REG_A1)(a0)
/* second saved register block */
sw s2, REG_OFFSET(REG_S2)(a0)
@ -41,5 +41,6 @@ FUNC(libucontext_getcontext)
sw s11, REG_OFFSET(REG_S11)(a0)
/* done saving, return */
mv a0, x0
ret
END(libucontext_getcontext)

View File

@ -28,8 +28,8 @@ FUNC(libucontext_swapcontext)
sw s1, REG_OFFSET(REG_S1)(a0)
/* return register block */
sw a0, REG_OFFSET(REG_A0)(a0)
sw a1, REG_OFFSET(REG_A1)(a0)
sw x0, REG_OFFSET(REG_A0)(a0)
sw x0, REG_OFFSET(REG_A1)(a0)
/* second saved register block */
sw s2, REG_OFFSET(REG_S2)(a0)