[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute |
Date: |
Wed, 18 Jun 2014 18:33:44 +0100 |
On 18 June 2014 18:27, Stefan Weil <address@hidden> 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
- [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Stefan Weil, 2014/06/17
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Peter Maydell, 2014/06/17
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Richard Henderson, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Stefan Weil, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Stefan Weil, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Peter Maydell, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Paolo Bonzini, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Richard Henderson, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Stefan Weil, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Peter Maydell, 2014/06/18