From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxJkQ-0004rd-Tk for qemu-devel@nongnu.org; Wed, 18 Jun 2014 13:34:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxJkM-0004T1-8N for qemu-devel@nongnu.org; Wed, 18 Jun 2014 13:34:10 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:39192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxJkM-0004Sj-0T for qemu-devel@nongnu.org; Wed, 18 Jun 2014 13:34:06 -0400 Received: by mail-la0-f42.google.com with SMTP id pn19so760815lab.29 for ; Wed, 18 Jun 2014 10:34:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53A1CC18.2000203@weilnetz.de> References: <1403039230-3427-1-git-send-email-sw@weilnetz.de> <53A1157E.9020409@twiddle.net> <53A1163A.1060902@weilnetz.de> <53A1194F.606@weilnetz.de> <53A1ADE8.3010800@twiddle.net> <53A1CC18.2000203@weilnetz.de> From: Peter Maydell Date: Wed, 18 Jun 2014 18:33:44 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers , Richard Henderson On 18 June 2014 18:27, Stefan Weil wrote: > Am 18.06.2014 17:19, schrieb Richard Henderson: >> >> On 06/17/2014 09:45 PM, Stefan Weil wrote: >>> >>> Variable arguments usually are not converted to 64 bit values: if >>> they are smaller than int, they are expanded to int, and larger >>> values are passed as they are. But here obviously the compiler >>> expands uint32_t to int64_t. Why? >> >> They really really shouldn't be. It might be worth trying something >> more recent than 4.6.3, and if it persists file a bug. r~ > > I found the source of the problem. > > The compiler is correct. Eight format strings in > disas/libvixl/a64/disasm-a64.cc are wrong. > > The functions which are called don't come from > disas/libvixl/a64/assembler-a64.h as I expected. > They are generated by code in disas/libvixl/a64/instructions-a64.h: > > #define DEFINE_GETTER(Name, HighBit, LowBit, Func) \ > inline int64_t Name() const { return Func(HighBit, LowBit); } > INSTRUCTION_FIELDS_LIST(DEFINE_GETTER) > #undef DEFINE_GETTER > > So each of those functions really returns an int64_t which of course > should not use a "%d" format string. Thanks. I'll forward the bug report upstream... -- PMM