diff options
author | David Hildenbrand <david@redhat.com> | 2019-10-21 10:57:13 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-10-21 17:33:29 +0200 |
commit | 23e797749fff754b8a136ee37607c6448b06cfca (patch) | |
tree | e77da2026cfdf1ff2c01bbfccc918e3c27bd214d /target/s390x/vec_int_helper.c | |
parent | b57b336876d08e303d5957d05bae77508ed0e4a2 (diff) |
s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION
Looks like my idea of what a "borrow" is was wrong. The PoP says:
"If the resulting subtraction results in a carry out of bit zero, a value
of one is placed in the corresponding element of the first operand;
otherwise, a value of zero is placed in the corresponding element"
As clarified by Richard, all we have to do is invert the result.
Fixes: 1ee2d7ba72f6 ("s390x/tcg: Implement VECTOR SUBTRACT COMPUTE BORROW INDICATION")
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20191021085715.3797-5-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/vec_int_helper.c')
-rw-r--r-- | target/s390x/vec_int_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/s390x/vec_int_helper.c b/target/s390x/vec_int_helper.c index d38405848f..0d6bc13dd6 100644 --- a/target/s390x/vec_int_helper.c +++ b/target/s390x/vec_int_helper.c @@ -593,7 +593,7 @@ void HELPER(gvec_vscbi##BITS)(void *v1, const void *v2, const void *v3, \ const uint##BITS##_t a = s390_vec_read_element##BITS(v2, i); \ const uint##BITS##_t b = s390_vec_read_element##BITS(v3, i); \ \ - s390_vec_write_element##BITS(v1, i, a < b); \ + s390_vec_write_element##BITS(v1, i, a >= b); \ } \ } DEF_VSCBI(8) |