From 51736549e33fc8468e47861031a70c7f8cadd691 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 3 Sep 2018 12:56:53 +0200 Subject: [PATCH] Bug 398066 s390x: cgijl dep1, 0 reports false uninitialised values warning. This is similar to bug #387712 (about cgijnl), but a newer gcc uses cgijl now. So use a similar fix when cc_dep2 is zero, only check whether the most significant bit of cc_dep1 is set to 1. --- NEWS | 1 + VEX/priv/guest_s390_helpers.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index c79d77509..9a6e2a367 100644 --- a/NEWS +++ b/NEWS @@ -145,6 +145,7 @@ where XXXXXX is the bug number as listed below. 397012 glibc ld.so uses arch_prctl on i386 397354 utimensat should ignore timespec tv_sec if tv_nsec is UTIME_NOW/OMIT 397424 glibc 2.27 and gdb_server tests +398066 s390x: cgijl dep1, 0 reports false unitialised values warning n-i-bz Fix missing workq_ops operations (macOS) n-i-bz fix bug in strspn replacement diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 52e4ce936..aeda67704 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -1935,6 +1935,14 @@ guest_s390x_spechelper(const HChar *function_name, IRExpr **args, return unop(Iop_1Uto32, binop(Iop_CmpNE64, cc_dep1, cc_dep2)); } if (cond == 4 || cond == 4 + 1) { + if (isC64_exactly(cc_dep2, 0)) { + /* dep1 m.s.bit of dep1 == 1 */ + return unop(Iop_64to32, + binop(Iop_And64, + binop(Iop_Shr64, cc_dep1, mkU8(63)), + mkU64(1))); + } return unop(Iop_1Uto32, binop(Iop_CmpLT64S, cc_dep1, cc_dep2)); } if (cond == 8 + 4 || cond == 8 + 4 + 1) { -- 2.11.4.GIT