diff options
| author | Richard Henderson | 2020-12-14 23:13:55 +0100 |
|---|---|---|
| committer | Cornelia Huck | 2020-12-21 18:11:33 +0100 |
| commit | a2db06da7dff662159c809059cda5e2aa302ec86 (patch) | |
| tree | ca594af1e916b3496fb5f8c276fae0e2687c5c4e /target/s390x/helper.c | |
| parent | target/s390x: Improve ADD LOGICAL WITH CARRY (diff) | |
| download | qemu-a2db06da7dff662159c809059cda5e2aa302ec86.tar.gz qemu-a2db06da7dff662159c809059cda5e2aa302ec86.tar.xz qemu-a2db06da7dff662159c809059cda5e2aa302ec86.zip | |
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>
Diffstat (limited to 'target/s390x/helper.c')
| -rw-r--r-- | target/s390x/helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 4f4561bc64..fa3aa500e5 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -396,6 +396,7 @@ const char *cc_name(enum cc_op cc_op) [CC_OP_STATIC] = "CC_OP_STATIC", [CC_OP_NZ] = "CC_OP_NZ", [CC_OP_ADDU] = "CC_OP_ADDU", + [CC_OP_SUBU] = "CC_OP_SUBU", [CC_OP_LTGT_32] = "CC_OP_LTGT_32", [CC_OP_LTGT_64] = "CC_OP_LTGT_64", [CC_OP_LTUGTU_32] = "CC_OP_LTUGTU_32", @@ -404,13 +405,11 @@ const char *cc_name(enum cc_op cc_op) [CC_OP_LTGT0_64] = "CC_OP_LTGT0_64", [CC_OP_ADD_64] = "CC_OP_ADD_64", [CC_OP_SUB_64] = "CC_OP_SUB_64", - [CC_OP_SUBU_64] = "CC_OP_SUBU_64", [CC_OP_SUBB_64] = "CC_OP_SUBB_64", [CC_OP_ABS_64] = "CC_OP_ABS_64", [CC_OP_NABS_64] = "CC_OP_NABS_64", [CC_OP_ADD_32] = "CC_OP_ADD_32", [CC_OP_SUB_32] = "CC_OP_SUB_32", - [CC_OP_SUBU_32] = "CC_OP_SUBU_32", [CC_OP_SUBB_32] = "CC_OP_SUBB_32", [CC_OP_ABS_32] = "CC_OP_ABS_32", [CC_OP_NABS_32] = "CC_OP_NABS_32", |
