On 20 July 2012 23:48, Catalin Patulea <catal...@google.com> wrote:
> On Tue, Jul 17, 2012 at 10:49 AM, Catalin Patulea <catal...@google.com> 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