]> git.proxmox.com Git - mirror_qemu.git/commit
target/s390x: Improve cc computation for SUBTRACT LOGICAL
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 14 Dec 2020 22:13:55 +0000 (16:13 -0600)
committerCornelia Huck <cohuck@redhat.com>
Mon, 21 Dec 2020 17:11:33 +0000 (18:11 +0100)
commita2db06da7dff662159c809059cda5e2aa302ec86
treeca594af1e916b3496fb5f8c276fae0e2687c5c4e
parent3bcc3fa79902d72ab6385bb135e4c3e34931a697
target/s390x: Improve cc computation for SUBTRACT LOGICAL

The resulting cc is only dependent on the result and the carry-out.
Carry-out and borrow-out are inverses, so are trivially converted.
With tcg ops, it is easier to compute borrow-out than carry-out, so
save result and borrow-out rather than the inputs.

Borrow-out for 64-bit inputs is had via tcg_gen_sub2_i64 directly
into cc_src.  Borrow-out for 32-bit inputs is had via extraction
from a normal 64-bit sub (with zero-extended inputs).

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201214221356.68039-4-richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/cc_helper.c
target/s390x/helper.c
target/s390x/insn-data.def
target/s390x/internal.h
target/s390x/translate.c