[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute |
Date: |
Wed, 18 Jun 2014 19:27:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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.
Stefan
- [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 <=
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Peter Maydell, 2014/06/18
- Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute, Peter Maydell, 2014/06/18