[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose struct
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures |
Date: |
Thu, 18 Jan 2018 15:17:44 +0000 |
On 18 January 2018 at 14:59, Philippe Mathieu-Daudé <address@hidden> wrote:
> My comment was for a previous line:
>
> uint64_t frac : 64;
>
> I don't have enough compiler knowledge to be sure how this bitfield is
> interpreted by the compiler. I understood the standard as bitfields are
> for 'unsigned', and for IL32 we have sizeof(unsigned) = 32, so I wonder
> how a :64 bitfield ends (bits >= 32 silently truncated?).
Defining a 64-bit bitfield is a bit pointless (why not just use
uint64_t?) but there's nothing particularly different for IL32P64 here.
The spec says the underlying type is _Bool, signed int, unsigned
into, or an implementation defined type. For QEMU's hosts 'int'
is always 32 bits, so if gcc and clang allow bitfields on a
64-bit type like uint64_t (as an impdef extension) then they
should work on all hosts. (In any case it needs to either work
or give a compiler error, silent truncation isn't an option.)
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v2 07/20] fpu/softfloat: propagate signalling NaNs in MINMAX, (continued)
[Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Alex Bennée, 2018/01/09
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Richard Henderson, 2018/01/09
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Peter Maydell, 2018/01/12
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Philippe Mathieu-Daudé, 2018/01/12
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Alex Bennée, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Philippe Mathieu-Daudé, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Peter Maydell, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Philippe Mathieu-Daudé, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Alex Bennée, 2018/01/23
[Qemu-devel] [PATCH v2 11/20] fpu/softfloat: re-factor add/sub, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 14/20] fpu/softfloat: re-factor muladd, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 16/20] fpu/softfloat: re-factor float to int/uint, Alex Bennée, 2018/01/09