From: Julien Grall Date: Tue, 26 Mar 2019 21:26:57 +0000 (+0000) Subject: xen/arm: cpufeature: Match register size with value size in cpus_have_const_cap X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1361 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32a813fe7d531cdb81221930e150edfba7cbbf52;p=xen.git xen/arm: cpufeature: Match register size with value size in cpus_have_const_cap Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The asm statement expects a 32-bit (resp. 64-bit) value on Arm32 (resp. Arm64) whereas the value is a boolean (Clang consider to be 32-bit). It would be possible to impose 32-bit register for both architecture but this require the code to use __OP32. However, it does no really improve the assembly generated. Instead, replace switch the variable to use register_t. Signed-off-by: Julien Grall Release-acked-by: Juergen Gross Acked-by: Stefano Stabellini --- diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h index c2c8f3417c..d06f09ecfa 100644 --- a/xen/include/asm-arm/cpufeature.h +++ b/xen/include/asm-arm/cpufeature.h @@ -67,7 +67,7 @@ static inline bool cpus_have_cap(unsigned int num) /* System capability check for constant cap */ #define cpus_have_const_cap(num) ({ \ - bool __ret; \ + register_t __ret; \ \ asm volatile (ALTERNATIVE("mov %0, #0", \ "mov %0, #1", \