Skip to content
Unverified Commit 79ba5c1c authored by Ignacio Encinas's avatar Ignacio Encinas Committed by Alexandre Ghiti
Browse files

selftests: riscv: fix v_exec_initval_nolibc.c



Vector registers are zero initialized by the kernel. Stop accepting
"all ones" as a clean value.

Note that this was not working as expected given that
	value == 0xff
can be assumed to be always false by the compiler as value's range is
[-128, 127]. Both GCC (-Wtype-limits) and clang
(-Wtautological-constant-out-of-range-compare) warn about this.

Reviewed-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Tested-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Signed-off-by: default avatarIgnacio Encinas <ignacio@iencinas.com>
Link: https://lore.kernel.org/r/20250306-fix-v_exec_initval_nolibc-v2-1-97f9dc8a7faf@iencinas.com


Signed-off-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
parent 83d78ac6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment