]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Actually use "load on condition" for conditional moves
authorAndreas Arnez <arnez@linux.ibm.com>
Fri, 13 Mar 2020 16:20:20 +0000 (17:20 +0100)
committerAndreas Arnez <arnez@linux.ibm.com>
Fri, 13 Mar 2020 19:35:45 +0000 (20:35 +0100)
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.

VEX/priv/host_s390_defs.c

index 98c160d7126ffd4913e6f4ecf8237a8c4e84f754..80e56f603aa466b06f1579cc16e8db11fb003da8 100644 (file)
@@ -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: