qemu-e2k/target/i386
Laszlo Ersek 163b3d1af2 target/i386: floatx80: avoid compound literals in static initializers
Quoting ISO C99 6.7.8p4, "All the expressions in an initializer for an
object that has static storage duration shall be constant expressions or
string literals".

The compound literal produced by the make_floatx80() macro is not such a
constant expression, per 6.6p7-9. (An implementation may accept it,
according to 6.6p10, but is not required to.)

Therefore using "floatx80_zero" and make_floatx80() for initializing
"f2xm1_table" and "fpatan_table" is not portable. And gcc-4.8 in RHEL-7.6
actually chokes on them:

> target/i386/fpu_helper.c:871:5: error: initializer element is not constant
>      { make_floatx80(0xbfff, 0x8000000000000000ULL),
>      ^

We've had the make_floatx80_init() macro for this purpose since commit
3bf7e40ab9 ("softfloat: fix for C99", 2012-03-17), so let's use that
macro again.

Fixes: eca30647fc ("target/i386: reimplement f2xm1 using floatx80 operations")
Fixes: ff57bb7b63 ("target/i386: reimplement fpatan using floatx80 operations")
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Link: https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg06566.html
Link: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04714.html
Message-Id: <20200716144251.23004-1-lersek@redhat.com>
Message-Id: <20200724064509.331-8-alex.bennee@linaro.org>
2020-07-27 09:40:16 +01:00
..
hvf i386: hvf: Explicitly set CR4 guest/host mask 2020-07-16 14:15:13 -04:00
arch_dump.c
arch_memory_mapping.c
bpt_helper.c
cc_helper_template.h
cc_helper.c
cpu-param.h
cpu-qom.h
cpu.c target/i386: add the missing vmx features for Skylake-Server and Cascadelake-Server CPU models 2020-07-16 11:05:03 -04:00
cpu.h target/i386: add fast short REP MOV support 2020-07-16 11:05:03 -04:00
excp_helper.c
fpu_helper.c target/i386: floatx80: avoid compound literals in static initializers 2020-07-27 09:40:16 +01:00
gdbstub.c
hax-all.c
hax-i386.h
hax-interface.h
hax-mem.c
hax-posix.c hax: Fix setting of FD_CLOEXEC 2020-07-13 09:01:01 -05:00
hax-posix.h
hax-windows.c
hax-windows.h
helper.c apic: Report current_count via 'info lapic' 2020-07-10 19:26:55 -04:00
helper.h
hyperv-proto.h
hyperv-stub.c
hyperv.c
hyperv.h
int_helper.c
kvm_i386.h KVM: x86: believe what KVM says about WAITPKG 2020-07-10 18:02:22 -04:00
kvm-stub.c
kvm.c KVM: fix CPU reset wrt HF2_GIF_MASK 2020-07-23 15:03:54 -04:00
machine.c
Makefile.objs
mem_helper.c
misc_helper.c
monitor.c target/i386: sev: provide proper error reporting for query-sev-capabilities 2020-07-10 18:02:22 -04:00
mpx_helper.c
ops_sse_header.h
ops_sse.h
seg_helper.c
sev_i386.h target/i386: sev: provide proper error reporting for query-sev-capabilities 2020-07-10 18:02:22 -04:00
sev-stub.c target/i386: sev: provide proper error reporting for query-sev-capabilities 2020-07-10 18:02:22 -04:00
sev.c target/i386: sev: fail query-sev-capabilities if QEMU cannot use SEV 2020-07-10 18:02:22 -04:00
shift_helper_template.h
smm_helper.c
svm_helper.c
svm.h
tcg-stub.c
trace-events
translate.c target/i386: Save cc_op before loop insns 2020-07-24 14:29:35 -07:00
whp-dispatch.h
whpx-all.c
xsave_helper.c