Fix a bug in insn selection. For some reason Iop_1UtoXYZ did no
zero-extension. That is essential, as not all computation is donw
using 8-byte values.
For example
- do a 64-bit computation in r1; assume leftmost 4 bytes != 0
- do a 32-bit computation in r1; leftmost 4 bytes are untouched != 0
- do 32to1 on r1; rightmost 4 bytes == 1; leftmost 4 bytes != 0
- do 1Uto64 on r1
Without zero-extension r1 will contain a value that is not boolean
git-svn-id: svn://svn.valgrind.org/vex/trunk@2458 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/host_s390_isel.c b/priv/host_s390_isel.c
index e54dd21..565111a 100644
--- a/priv/host_s390_isel.c
+++ b/priv/host_s390_isel.c
@@ -1144,8 +1144,15 @@
switch (unop) {
case Iop_1Uto8:
case Iop_1Uto32:
+ /* Zero extend */
+ mask.variant.imm = 1;
+ addInstr(env, s390_insn_alu(4, S390_ALU_AND, dst, mask));
+ break;
+
case Iop_1Uto64:
- /* Nothing to do */
+ /* Zero extend */
+ mask.variant.imm = 1;
+ addInstr(env, s390_insn_alu(8, S390_ALU_AND, dst, mask));
break;
case Iop_1Sto8: