qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] tests/tcg: add test-i386-fprem and make target for comparing QEMU to h/w
Date: Sat, 21 Jul 2012 10:03:12 +0100

On 20 July 2012 23:48, Catalin Patulea <address@hidden> wrote:
> On Tue, Jul 17, 2012 at 10:49 AM, Catalin Patulea <address@hidden> wrote:
>> > the Windows build would not put the fields 'mantissa' and
>> > 'one' in the same 64 bit word, it would insert a padding bit.
>> Since floatx80 is not part of a Windows API (in fact, it's not part of
>> any API, it's in a test), could I give the structs an attribute of
>> "gcc_struct"?
> I just noticed that QEMU_PACKED includes this attribute whenever it is
> needed (#if defined(_WIN32)) since Stefan Weil's
> 0f7fdd347514ea97b24f5f658f3ae31f9b078397. Would making the float80u
> structs QEMU_PACKED be a reasonable solution? Stefan, can you comment
> on whether this is an appropriate use of QEMU_PACKED?

I think the general rule would be "don't use bitfields at all where
you care about layout in memory". Since this is only test case code
we might be more relaxed about it, though.

I don't have any other issues with the patch and I'm happy to leave
TODOs about missing areas of testing; as you say, some testing is
better than none.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]