Skip to content
Commit 0ed2cdf3 authored by Suzuki Poulose's avatar Suzuki Poulose Committed by Andrew Jones
Browse files

arm64: Fix sve_vl() for build errors



commit 5b9895f8 ("arm: Fix clang error in sve_vl()") breaks the build
with the following compiler version, as the "rdvl" expects a 64bit register.

/tmp/ccGJYtuC.s: Assembler messages:
/tmp/ccGJYtuC.s:2165: Error: operand mismatch -- `rdvl w3,#8'
/tmp/ccGJYtuC.s:2165: Info:    did you mean this?
/tmp/ccGJYtuC.s:2165: Info:     rdvl x3, #8
make: *** [<builtin>: arm/selftest.o] Error 1
make: *** Waiting for unfinished jobs....

$ aarch64-none-elf-gcc --version
aarch64-none-elf-gcc (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16)) 10.2.1 20201103

Fix this by switching to use "unsigned long" variable and restoring the 64bit
register for the instruction

Fixes: 5b9895f8 ("arm: Fix clang error in sve_vl()")
Cc: Raghavendra Rao Ananta <rananta@google.com>
Cc: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarAndrew Jones <andrew.jones@linux.dev>
parent 1c49a812
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