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
Makefile.objs target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
arch_dump.c dump: add kernel_gs_base to QEMU CPU state 2018-07-16 16:13:34 +02:00
arch_memory_mapping.c exec,dump,i386,ppc,s390x: don't include exec/cpu-all.h explicitly 2017-09-19 18:21:33 +02:00
bpt_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
cc_helper.c target-i386: Use ctpop helper 2017-01-10 08:49:59 -08:00
cc_helper_template.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h cpu: Use DeviceClass reset instead of a special CPUClass reset 2020-03-17 19:48:10 -04:00
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 tcg/svm: use host cr4 during NPT page table walk 2020-07-10 18:02:14 -04:00
fpu_helper.c target/i386: floatx80: avoid compound literals in static initializers 2020-07-27 09:40:16 +01:00
gdbstub.c target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
hax-all.c hax: Dynamic allocate vcpu state structure 2020-06-10 12:09:59 -04:00
hax-i386.h i386: Remove unused define's from hax and hvf 2020-06-10 12:10:47 -04:00
hax-interface.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
hax-mem.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
hax-posix.c hax: Fix setting of FD_CLOEXEC 2020-07-13 09:01:01 -05:00
hax-posix.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
hax-windows.c hax: Windows doesn't like posix device names 2020-04-14 10:37:42 -04:00
hax-windows.h hax: Support guest RAM sizes of 4GB or more 2018-02-13 11:44:13 +01:00
helper.c apic: Report current_count via 'info lapic' 2020-07-10 19:26:55 -04:00
helper.h target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
hyperv-proto.h i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
hyperv-stub.c target/i386: fix feature check in hyperv-stub.c 2019-07-05 22:16:46 +02:00
hyperv.c i386/kvm: convert hyperv enlightenments properties from bools to bits 2019-06-21 02:29:38 +02:00
hyperv.h hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
int_helper.c target/i386: Implement CPUID_EXT_RDRAND 2019-05-22 12:38:54 -04:00
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c KVM: fix CPU reset wrt HF2_GIF_MASK 2020-07-23 15:03:54 -04:00
kvm_i386.h KVM: x86: believe what KVM says about WAITPKG 2020-07-10 18:02:22 -04:00
machine.c KVM: add support for AMD nested live migration 2020-07-10 18:02:17 -04:00
mem_helper.c tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
misc_helper.c target/i386: Fix OUTL debug output 2020-06-10 12:09:35 -04:00
monitor.c target/i386: sev: provide proper error reporting for query-sev-capabilities 2020-07-10 18:02:22 -04:00
mpx_helper.c target/i386: move cpu_sync_bndcs_hflags() function 2017-07-05 09:12:44 +02:00
ops_sse.h target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
ops_sse_header.h target-i386: Use ctpop helper 2017-01-10 08:49:59 -08:00
seg_helper.c target/i386: Use cpu_*_mmuidx_ra instead of templates 2020-01-15 15:13:10 -10: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
sev_i386.h target/i386: sev: provide proper error reporting for query-sev-capabilities 2020-07-10 18:02:22 -04:00
shift_helper_template.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
smm_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
svm.h tcg/svm: use host cr4 during NPT page table walk 2020-07-10 18:02:14 -04:00
svm_helper.c tcg/svm: use host cr4 during NPT page table walk 2020-07-10 18:02:14 -04:00
tcg-stub.c target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
translate.c target/i386: Save cc_op before loop insns 2020-07-24 14:29:35 -07:00
whp-dispatch.h WHPX: TSC get and set should be dependent on VM state 2020-03-16 23:02:21 +01:00
whpx-all.c WHPX: Use proper synchronization primitives while processing 2020-03-16 23:02:24 +01:00
xsave_helper.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00