[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static a
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch |
Date: |
Mon, 4 Sep 2017 17:17:25 +0100 |
On 4 September 2017 at 16:53, Laurent Vivier <address@hidden> wrote:
> Le 04/09/2017 à 17:02, Peter Maydell a écrit :
>> On 4 September 2017 at 15:09, Laurent Vivier <address@hidden> wrote:
>>> You can:
>>>
>>> either replace the "#define floatx80_pi make_floatx80(...)" by a "const
>>> floatx80 floatx80_pi = make_floatx80_init(...)"
>>>
>>> or replace all the macros in the m68k/fpu_helper.c array by
>>> make_floatx80_init(...)
>>
>> Taking a step back, what's different about floatx80 and float12
>> that means they need separate _init and non-init versions of
>> the macros, when for float16/float32/float64 we instead have
>> #define make_float32(x) __extension__ ({ float32 f32_val = {x}; f32_val; })
>> #define const_float32(x) { x }
>
> floatx80/float128 are structureq while float16/float32/float64 are
> native data types.
If USE_SOFTFLOAT_STRUCT_TYPES is defined then float16/32/64 are
also struct types and use the make_ and const_ macros as above.
(We should check whether USE_SOFTFLOAT_STRUCT_TYPES still builds,
it tends to bitrot. If it does then maybe we should use it by default
since gcc 3 is now just a memory...)
>> ? Could we move to consistency for the macro naming we're using?
>
> Do you mean "s/make_floatx80_init/const_floatx80/"?
Yes (and the same implementation would be nice too).
thanks
-- PMM
- [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Kamil Rytarowski, 2017/09/03
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Laurent Vivier, 2017/09/03
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Philippe Mathieu-Daudé, 2017/09/03
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Peter Maydell, 2017/09/04
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Kamil Rytarowski, 2017/09/04
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Laurent Vivier, 2017/09/04
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Kamil Rytarowski, 2017/09/04
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Laurent Vivier, 2017/09/04
- Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, Peter Maydell, 2017/09/04
Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch, no-reply, 2017/09/04
[Qemu-devel] [PATCH v2] target/m68k: Switch fpu_rom from make_floatx80() to make_floatx80_init(), Kamil Rytarowski, 2017/09/04