fc6e0d0f2d
Reported by Paul Eggert in https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00050.html This program currently prints different results when run with TCG instead of running on real s390x hardware: #include <stdio.h> int overflow_32 (int x, int y) { int sum; return __builtin_sub_overflow (x, y, &sum); } int overflow_64 (long long x, long long y) { long sum; return __builtin_sub_overflow (x, y, &sum); } int a1 = 0; int b1 = -2147483648; long long a2 = 0L; long long b2 = -9223372036854775808L; int main () { { int a = a1; int b = b1; printf ("a = 0x%x, b = 0x%x\n", a, b); printf ("no_overflow = %d\n", ! overflow_32 (a, b)); } { long long a = a2; long long b = b2; printf ("a = 0x%llx, b = 0x%llx\n", a, b); printf ("no_overflow = %d\n", ! overflow_64 (a, b)); } } Signed-off-by: Bruno Haible <bruno@clisp.org> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/618 Message-Id: <20220323162621.139313-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
kvm | ||
tcg | ||
arch_dump.c | ||
cpu_features_def.h | ||
cpu_features_def.h.inc | ||
cpu_features.c | ||
cpu_features.h | ||
cpu_models_sysemu.c | ||
cpu_models_user.c | ||
cpu_models.c | ||
cpu_models.h | ||
cpu-dump.c | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu-sysemu.c | ||
cpu.c | ||
cpu.h | ||
diag.c | ||
gdbstub.c | ||
gen-features.c | ||
helper.c | ||
helper.h | ||
interrupt.c | ||
ioinst.c | ||
Kconfig | ||
machine.c | ||
meson.build | ||
mmu_helper.c | ||
s390x-internal.h | ||
sigp.c | ||
trace-events | ||
trace.h |