From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRQkl-0002cz-PJ for qemu-devel@nongnu.org; Sat, 01 Jul 2017 18:20:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRQkg-0003tX-S2 for qemu-devel@nongnu.org; Sat, 01 Jul 2017 18:20:35 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:35463) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRQkg-0003sy-NU for qemu-devel@nongnu.org; Sat, 01 Jul 2017 18:20:30 -0400 Received: by mail-qt0-x244.google.com with SMTP id w12so19373368qta.2 for ; Sat, 01 Jul 2017 15:20:30 -0700 (PDT) Sender: Richard Henderson References: <20170630153946.11997-1-bobby.prani@gmail.com> From: Richard Henderson Message-ID: <63517903-f0e7-59db-47e2-e12f595092cf@twiddle.net> Date: Sat, 1 Jul 2017 15:20:25 -0700 MIME-Version: 1.0 In-Reply-To: <20170630153946.11997-1-bobby.prani@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar , "Emilio G. Cota" , "open list:All patches CC here" 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~