public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: selftests: Fix vsetivli args for clang
@ 2024-07-03  1:54 Charlie Jenkins
  2024-07-04 13:10 ` patchwork-bot+linux-riscv
  0 siblings, 1 reply; 2+ messages in thread
From: Charlie Jenkins @ 2024-07-03  1:54 UTC (permalink / raw)
  To: Shuah Khan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Andy Chiu, Björn Töpel
  Cc: Palmer Dabbelt, linux-kselftest, linux-riscv, linux-kernel, llvm,
	Charlie Jenkins

Clang does not support implicit LMUL in the vset* instruction sequences.
Introduce an explicit LMUL in the vsetivli instruction.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Fixes: 9d5328eeb185 ("riscv: selftests: Add signal handling vector tests")
---
There is one more error that occurs when the test cases for riscv are
compiled with llvm:

ld.lld: error: undefined symbol: putchar
>>> referenced by crt.h:69 (./../../../../include/nolibc/crt.h:69)
>>>               /tmp/v_initval_nolibc-5b14c8.o:(dump)
>>> referenced by crt.h:67 (./../../../../include/nolibc/crt.h:67)
>>>               /tmp/v_initval_nolibc-5b14c8.o:(dump)

This is fixed in my rework of the vector tests in a different series [1]

Link: https://patchwork.kernel.org/project/linux-riscv/patch/20240619-xtheadvector-v3-12-bff39eb9668e@rivosinc.com/ [1]
---
 tools/testing/selftests/riscv/sigreturn/sigreturn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/riscv/sigreturn/sigreturn.c b/tools/testing/selftests/riscv/sigreturn/sigreturn.c
index 62397d5934f1..ed351a1cb917 100644
--- a/tools/testing/selftests/riscv/sigreturn/sigreturn.c
+++ b/tools/testing/selftests/riscv/sigreturn/sigreturn.c
@@ -51,7 +51,7 @@ static int vector_sigreturn(int data, void (*handler)(int, siginfo_t *, void *))
 
 	asm(".option push				\n\
 		.option		arch, +v		\n\
-		vsetivli	x0, 1, e32, ta, ma	\n\
+		vsetivli	x0, 1, e32, m1, ta, ma	\n\
 		vmv.s.x		v0, %1			\n\
 		# Generate SIGSEGV			\n\
 		lw		a0, 0(x0)		\n\

---
base-commit: f2661062f16b2de5d7b6a5c42a9a5c96326b8454
change-id: 20240701-fix_sigreturn_test-47d7063ac8e6
-- 
- Charlie


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] riscv: selftests: Fix vsetivli args for clang
  2024-07-03  1:54 [PATCH] riscv: selftests: Fix vsetivli args for clang Charlie Jenkins
@ 2024-07-04 13:10 ` patchwork-bot+linux-riscv
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-07-04 13:10 UTC (permalink / raw)
  To: Charlie Jenkins
  Cc: linux-riscv, shuah, paul.walmsley, palmer, aou, nathan,
	ndesaulniers, morbo, justinstitt, andy.chiu, bjorn, palmer,
	linux-kselftest, linux-kernel, llvm

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Tue, 02 Jul 2024 18:54:48 -0700 you wrote:
> Clang does not support implicit LMUL in the vset* instruction sequences.
> Introduce an explicit LMUL in the vsetivli instruction.
> 
> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
> Fixes: 9d5328eeb185 ("riscv: selftests: Add signal handling vector tests")
> ---
> There is one more error that occurs when the test cases for riscv are
> compiled with llvm:
> 
> [...]

Here is the summary with links:
  - riscv: selftests: Fix vsetivli args for clang
    https://git.kernel.org/riscv/c/3582ce0d7ccf

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-04 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03  1:54 [PATCH] riscv: selftests: Fix vsetivli args for clang Charlie Jenkins
2024-07-04 13:10 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox