|
Message-Id: <20240918011842.26118-1-alex@alexrp.com> Date: Wed, 18 Sep 2024 03:18:42 +0200 From: Alex Rønne Petersen <alex@...xrp.com> To: musl@...ts.openwall.com Cc: Alex Rønne Petersen <alex@...xrp.com> Subject: [PATCH] mips: use `jr $ra` instead of `j $ra` to work around an LLVM assembler bug Details here: https://github.com/llvm/llvm-project/issues/107460 This patch works around the bug by just using the `jr $ra` form, which also more precisely indicates the encoding intent anyway. --- crt/mips/crtn.s | 4 ++-- crt/mips64/crtn.s | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crt/mips/crtn.s b/crt/mips/crtn.s index 506a04b7..92eb3d0e 100644 --- a/crt/mips/crtn.s +++ b/crt/mips/crtn.s @@ -3,11 +3,11 @@ .section .init lw $gp,24($sp) lw $ra,28($sp) - j $ra + jr $ra addu $sp,$sp,32 .section .fini lw $gp,24($sp) lw $ra,28($sp) - j $ra + jr $ra addu $sp,$sp,32 diff --git a/crt/mips64/crtn.s b/crt/mips64/crtn.s index f3930b24..8f090ed3 100644 --- a/crt/mips64/crtn.s +++ b/crt/mips64/crtn.s @@ -3,11 +3,11 @@ .section .init ld $gp,16($sp) ld $ra,24($sp) - j $ra + jr $ra daddu $sp,$sp,32 .section .fini ld $gp,16($sp) ld $ra,24($sp) - j $ra + jr $ra daddu $sp,$sp,32 -- 2.40.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.