From: Andreas Arnez Date: Fri, 13 Mar 2020 16:20:20 +0000 (+0100) Subject: s390x: Actually use "load on condition" for conditional moves X-Git-Tag: VALGRIND_3_16_0~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95df121886a398f2bf5205eb63d5a9bceca5a764;p=thirdparty%2Fvalgrind.git s390x: Actually use "load on condition" for conditional moves Although the implementation of the cond_move insn is prepared to emit "load on condition" instructions, it doesn't, because of a reversed check. The check is supposed to prevent emitting LOCx instructions when the condition code mask is set to "always", but it's accidentally negated. Fix the reversal of the check, so LOCx instructions are actually emitted when applicable. --- diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 98c160d712..80e56f603a 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -10105,7 +10105,7 @@ s390_insn_cond_move_emit(UChar *buf, const s390_insn *insn) if (s390_host_has_lsc) { /* LOCx is not the preferred way to implement an unconditional load. */ - if (cond != S390_CC_ALWAYS) goto use_branch_insn; + if (cond == S390_CC_ALWAYS) goto use_branch_insn; switch (src.tag) { case S390_OPND_REG: