[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: |
Kamil Rytarowski |
Subject: |
Re: [Qemu-devel] [PATCH] target/m68k: Change fpu_rom from const static array to switch |
Date: |
Mon, 4 Sep 2017 17:16:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; NetBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 04.09.2017 17:02, Peter Maydell wrote:
> 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 }
>
> ? Could we move to consistency for the macro naming we're using?
>
> thanks
> -- PMM
>
I don't have insight on the reasoning, but float128 suffers from the
same reason as float80.
static const float128 fpu_rom123[128] = {
[0] = make_float128(0, 12)
};
target/m68k/fpu_helper.c:58:1: error: initializer element is not constant
target/m68k/fpu_helper.c:58:1: error: (near initialization for
'fpu_rom123[0]')
rules.mak:66: recipe for target 'target/m68k/fpu_helper.o' failed
make[1]: *** [target/m68k/fpu_helper.o] Error 1
On the other hand, something like this builds:
static const float16 fpu_rom123[128] = {
[0] = make_float16(0)
};
signature.asc
Description: OpenPGP digital signature
- [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 <=
- 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, 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