5a2e67a691
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_add_overflow (x, y, &sum); } int overflow_64 (long long x, long long y) { long sum; return ! __builtin_add_overflow (x, y, &sum); } int a1 = -2147483648; int b1 = -2147483648; long long a2 = -9223372036854775808L; 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/616 Message-Id: <20220323162621.139313-2-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
cc_helper.c | ||
crypto_helper.c | ||
excp_helper.c | ||
fpu_helper.c | ||
insn-data.def | ||
insn-format.def | ||
int_helper.c | ||
mem_helper.c | ||
meson.build | ||
misc_helper.c | ||
s390-tod.h | ||
tcg_s390x.h | ||
translate_vx.c.inc | ||
translate.c | ||
vec_fpu_helper.c | ||
vec_helper.c | ||
vec_int_helper.c | ||
vec_string_helper.c | ||
vec.h |