]> git.ipfire.org Git - thirdparty/valgrind.git/commit
s390x: Introduce and exploit new ALU operator S390_ALU_ILIH
authorAndreas Arnez <arnez@linux.ibm.com>
Thu, 2 Apr 2020 16:00:13 +0000 (18:00 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 8 Apr 2020 17:39:28 +0000 (19:39 +0200)
commit4e9763c617757712747e076b5d03bbb60a91c729
tree4664a367f18aeb3b8e5cbf17f04d6160f063de8b
parent1008ab726d43efd7e68225a56cc823a18eca8780
s390x: Introduce and exploit new ALU operator S390_ALU_ILIH

The handlers of Iop_8HLto16, Iop16HLto32, and Iop_32HLto64 in
s390_isel_int_wrk() yield a sequence of "shift", "and", and "or" ALU
operations, the second of which modifies a register returned from a call
to s390_isel_int_expr().  While this approach does not lead to wrong code
generation (because only the register's upper bits are changed which are
not relevant to the IR type), it violates the general "no-modify" rule.

Replace this sequence of ALU operations by a single ALU operation
S390_ALU_ILIH that inserts the low half of its second operand into the
high half of its first operand.  Use the z/Architecture instruction
RISBG ("rotate then insert selected bits") for implementating it.
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
VEX/priv/host_s390_isel.c