From ed663cf0e5ad6ef621d822c1860dc86feb3e47c9 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 7 Aug 2024 20:25:18 -0700 Subject: [PATCH] loongarch64: fix assembly warnings --- arch/loongarch64/makecontext.S | 16 ++++++++-------- arch/loongarch64/setcontext.S | 2 +- arch/loongarch64/swapcontext.S | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/loongarch64/makecontext.S b/arch/loongarch64/makecontext.S index 44ec9a5..f0f95b5 100644 --- a/arch/loongarch64/makecontext.S +++ b/arch/loongarch64/makecontext.S @@ -36,8 +36,8 @@ FUNC(libucontext_makecontext) st.d $a7, $sp, A7_OFF /* set $zero in the mcontext to 1. */ - addi.d $v0, $zero, 1 - st.d $v0, $t5, REG_OFFSET(0) + addi.d $a0, $zero, 1 + st.d $a0, $t5, REG_OFFSET(0) /* ensure the stack is aligned on a quad-word boundary. */ ld.d $t0, $t5, UCONTEXT_STACK_PTR @@ -59,9 +59,9 @@ FUNC(libucontext_makecontext) store_register_arg: addi.d $t3, $t3, 1 - ld.d $v1, $t1, 0 + ld.d $a1, $t1, 0 addi.d $t1, $t1, REG_SZ - st.d $v1, $t2, 0 + st.d $a1, $t2, 0 addi.d $t2, $t2, REG_SZ addi.d $t6, $zero, 8 bltu $t3, $t6, store_register_arg @@ -83,9 +83,9 @@ store_register_arg: store_stack_arg: addi.d $t3, $t3, 1 - ld.d $v1, $t1, 0 + ld.d $a1, $t1, 0 addi.d $t1, $t1, REG_SZ - st.d $v1, $t2, 0 + st.d $a1, $t2, 0 addi.d $t2, $t2, REG_SZ bltu $t3, $a2, store_stack_arg @@ -93,8 +93,8 @@ no_more_arguments: /* trampoline setup. */ la.got $t8, libucontext_trampoline - ld.d $v1, $t5, UCONTEXT_UC_LINK - st.d $v1, $t5, REG_OFFSET(23) + ld.d $a1, $t5, UCONTEXT_UC_LINK + st.d $a1, $t5, REG_OFFSET(23) st.d $t0, $t5, REG_OFFSET(3) diff --git a/arch/loongarch64/setcontext.S b/arch/loongarch64/setcontext.S index 9a0e0b7..2528de0 100644 --- a/arch/loongarch64/setcontext.S +++ b/arch/loongarch64/setcontext.S @@ -49,7 +49,7 @@ FUNC(libucontext_setcontext) ld.d $t8, $t5, (MCONTEXT_PC) jr $t8 - move $v0, $zero + move $a0, $zero POP_FRAME(libucontext_setcontext) END(libucontext_setcontext) diff --git a/arch/loongarch64/swapcontext.S b/arch/loongarch64/swapcontext.S index b5063f6..6cde30e 100644 --- a/arch/loongarch64/swapcontext.S +++ b/arch/loongarch64/swapcontext.S @@ -77,7 +77,7 @@ FUNC(libucontext_swapcontext) ld.d $t8, $t4, (MCONTEXT_PC) jr $t8 - move $v0, $zero + move $a0, $zero fail: la.global $t8, exit @@ -85,5 +85,5 @@ fail: POP_FRAME(libucontext_swapcontext) jirl $ra, $t8, 0 - move $v0, $zero + move $a0, $zero END(libucontext_swapcontext)