Followup to
942a48c1d which fixed the register usage of conditional
moves for s390_insn_get_reg_usage. A similar fix is needed for
s390_insn_map_regs considering the case when the condition is
S390_CC_NEVER.
Fixes https://bugs.kde.org/show_bug.cgi?id=507173
506910 openat2 with RESOLVE_NO_MAGICLINKS succeeds on /proc/self/exe
506930 valgrind allows SIGKILL being reset to SIG_DFL
506970 mmap needs an EBADF fd_allowed check
+507173 s390x: Crash when constant folding is disabled
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
break;
case S390_INSN_COND_MOVE:
- insn->variant.cond_move.dst = lookupHRegRemap(m, insn->variant.cond_move.dst);
- s390_opnd_RMI_map_regs(m, &insn->variant.cond_move.src);
+ if (insn->variant.cond_move.cond != S390_CC_NEVER) {
+ insn->variant.cond_move.dst = lookupHRegRemap(m, insn->variant.cond_move.dst);
+ s390_opnd_RMI_map_regs(m, &insn->variant.cond_move.src);
+ }
break;
case S390_INSN_LOAD_IMMEDIATE: