[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang |
Date: |
Fri, 30 Jun 2017 17:15:14 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Fri, Jun 30, 2017 at 11:39:46 -0400, Pranith Kumar wrote:
> Clang generates the following warning on aarch64 host:
>
> CC util/cacheinfo.o
> /home/pranith/qemu/util/cacheinfo.c:121:48: warning: value size does not
> match register size specified by the constraint and modifier
> [-Wasm-operand-widths]
> asm volatile("mrs\t%0, ctr_el0" : "=r"(ctr));
> ^
> /home/pranith/qemu/util/cacheinfo.c:121:28: note: use constraint modifier "w"
> asm volatile("mrs\t%0, ctr_el0" : "=r"(ctr));
> ^~
> %w0
>
> Constraint modifier 'w' is not (yet?) accepted by gcc. Fix this by increasing
> the ctr size.
>
> Signed-off-by: Pranith Kumar <address@hidden>
I can reproduce with clang 3.9.1.
Tested-by: Emilio G. Cota <address@hidden>
Reviewed-by: Emilio G. Cota <address@hidden>
Thanks,
Emilio