qemu-patch-raspberry4/include
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
..
authz Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block block: Add support to warn on backing file change without format 2020-07-14 15:18:59 +02:00
chardev chardev: Reduce "char-mux.h" scope, rename it "chardev-internal.h" 2020-07-13 11:59:47 +04:00
crypto firmware (and crypto) patches 2020-07-09 20:01:43 +01:00
disas target/avr: Register AVR support with the rest of QEMU 2020-07-11 11:02:05 +02:00
exec virtio,acpi: features, fixes, cleanups. 2020-07-07 17:37:44 +01:00
fpu target/i386: floatx80: avoid compound literals in static initializers 2020-07-27 09:40:16 +01:00
hw This PR contains a few RISC-V fixes. 2020-07-23 19:00:42 +01:00
io io/task: Move 'qom/object.h' header to source 2020-06-10 12:09:37 -04:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration/colo: Use ram_block_discard_disable() 2020-07-02 05:54:59 -04:00
monitor hmp: Implement qom-get HMP command 2020-06-01 18:44:27 +01:00
net hw/net: Added plen fix for IPv6 2020-07-21 21:30:39 +08:00
qapi qapi/error: Check format string argument in error_*prepend() 2020-07-24 15:03:09 +02:00
qemu util: add qemu_get_host_physmem utility function 2020-07-27 09:40:12 +01:00
qom qom: Document object_get_canonical_path() returns malloced string 2020-07-21 16:23:43 +02:00
scsi scsi: explicitly list guest-recoverable sense codes 2019-07-15 11:20:42 +02:00
standard-headers Linux headers: update 2020-06-18 12:13:36 +02:00
sysemu Revert "tpm: Clean up error reporting in tpm_init_tpmdev()" 2020-07-24 12:44:13 -04:00
tcg tcg: call qemu_spin_destroy for tb->jmp_lock 2020-06-16 14:49:05 +01:00
ui Remove the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE switch 2020-07-13 11:40:52 +02:00
user linux-user: Include trace-root.h in syscall-trace.h 2020-01-15 15:13:09 -10:00
elf.h hw/avr: Add support for loading ELF/raw binaries 2020-07-11 11:02:05 +02:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h qemu-common: Document qemu_find_file() 2020-07-21 16:13:04 +02:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00