qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang
Date: Sat, 1 Jul 2017 15:20:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/30/2017 08:39 AM, 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

That is an absolutely stupid warning. There's long precedent for the compiler choosing the prefix for you based on the type of the argument.


Constraint modifier 'w' is not (yet?) accepted by gcc. Fix this by increasing 
the ctr size.

Certainly it is -- since the beginning of time.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]