From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute
Date: Wed, 18 Jun 2014 18:33:44 +0100 [thread overview]
Message-ID: <CAFEAcA-asSsOwU03dvvxmKfckbcz_faV_bBFeB+2PWYmf7ap_w@mail.gmail.com> (raw)
In-Reply-To: <53A1CC18.2000203@weilnetz.de>
On 18 June 2014 18:27, Stefan Weil <sw@weilnetz.de> 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
next prev parent reply other threads:[~2014-06-18 17:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 21:07 [Qemu-devel] [PATCH] libvixl: Add gcc format attribute Stefan Weil
2014-06-17 22:09 ` Peter Maydell
2014-06-18 4:16 ` Stefan Weil
2014-06-18 4:28 ` Richard Henderson
2014-06-18 4:31 ` Stefan Weil
2014-06-18 4:45 ` Stefan Weil
2014-06-18 8:26 ` Peter Maydell
2014-06-18 14:52 ` Paolo Bonzini
2014-06-18 15:19 ` Richard Henderson
2014-06-18 17:27 ` Stefan Weil
2014-06-18 17:33 ` Peter Maydell [this message]
2014-06-18 17:43 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA-asSsOwU03dvvxmKfckbcz_faV_bBFeB+2PWYmf7ap_w@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).