[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/9] s390x/tcg: Fix VECTOR MULTIPLY AND ADD *
From: |
Cornelia Huck |
Subject: |
[PULL 4/9] s390x/tcg: Fix VECTOR MULTIPLY AND ADD * |
Date: |
Tue, 22 Oct 2019 11:54:23 +0200 |
From: David Hildenbrand <address@hidden>
We missed that we always read a "double-wide even-odd element
pair of the fourth operand". Fix it in all four variants.
Fixes: 1b430aec4157 ("s390x/tcg: Implement VECTOR MULTIPLY AND ADD *")
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/vec_int_helper.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/s390x/vec_int_helper.c b/target/s390x/vec_int_helper.c
index 03ae8631d958..1b3aaecbdb3d 100644
--- a/target/s390x/vec_int_helper.c
+++ b/target/s390x/vec_int_helper.c
@@ -336,7 +336,7 @@ void HELPER(gvec_vmae##BITS)(void *v1, const void *v2,
const void *v3, \
for (i = 0, j = 0; i < (128 / TBITS); i++, j += 2) {
\
int##TBITS##_t a = (int##BITS##_t)s390_vec_read_element##BITS(v2, j);
\
int##TBITS##_t b = (int##BITS##_t)s390_vec_read_element##BITS(v3, j);
\
- int##TBITS##_t c = (int##BITS##_t)s390_vec_read_element##BITS(v4, j);
\
+ int##TBITS##_t c = s390_vec_read_element##TBITS(v4, i);
\
\
s390_vec_write_element##TBITS(v1, i, a * b + c);
\
}
\
@@ -354,7 +354,7 @@ void HELPER(gvec_vmale##BITS)(void *v1, const void *v2,
const void *v3, \
for (i = 0, j = 0; i < (128 / TBITS); i++, j += 2) {
\
uint##TBITS##_t a = s390_vec_read_element##BITS(v2, j);
\
uint##TBITS##_t b = s390_vec_read_element##BITS(v3, j);
\
- uint##TBITS##_t c = s390_vec_read_element##BITS(v4, j);
\
+ uint##TBITS##_t c = s390_vec_read_element##TBITS(v4, i);
\
\
s390_vec_write_element##TBITS(v1, i, a * b + c);
\
}
\
@@ -372,7 +372,7 @@ void HELPER(gvec_vmao##BITS)(void *v1, const void *v2,
const void *v3, \
for (i = 0, j = 1; i < (128 / TBITS); i++, j += 2) {
\
int##TBITS##_t a = (int##BITS##_t)s390_vec_read_element##BITS(v2, j);
\
int##TBITS##_t b = (int##BITS##_t)s390_vec_read_element##BITS(v3, j);
\
- int##TBITS##_t c = (int##BITS##_t)s390_vec_read_element##BITS(v4, j);
\
+ int##TBITS##_t c = s390_vec_read_element##TBITS(v4, i);
\
\
s390_vec_write_element##TBITS(v1, i, a * b + c);
\
}
\
@@ -390,7 +390,7 @@ void HELPER(gvec_vmalo##BITS)(void *v1, const void *v2,
const void *v3, \
for (i = 0, j = 1; i < (128 / TBITS); i++, j += 2) {
\
uint##TBITS##_t a = s390_vec_read_element##BITS(v2, j);
\
uint##TBITS##_t b = s390_vec_read_element##BITS(v3, j);
\
- uint##TBITS##_t c = s390_vec_read_element##BITS(v4, j);
\
+ uint##TBITS##_t c = s390_vec_read_element##TBITS(v4, i);
\
\
s390_vec_write_element##TBITS(v1, i, a * b + c);
\
}
\
--
2.21.0
- [PULL 0/9] more s390x fixes, Cornelia Huck, 2019/10/22
- [PULL 1/9] s390x/cpumodel: Add missing visit_free, Cornelia Huck, 2019/10/22
- [PULL 2/9] s390x/mmu: Remove duplicate check for MMU_DATA_STORE, Cornelia Huck, 2019/10/22
- [PULL 3/9] s390x/tcg: Fix VECTOR MULTIPLY LOGICAL ODD, Cornelia Huck, 2019/10/22
- [PULL 4/9] s390x/tcg: Fix VECTOR MULTIPLY AND ADD *,
Cornelia Huck <=
- [PULL 5/9] s390x/tcg: Fix VECTOR SHIFT RIGHT ARITHMETIC BY BYTE, Cornelia Huck, 2019/10/22
- [PULL 6/9] s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION, Cornelia Huck, 2019/10/22
- [PULL 7/9] s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION, Cornelia Huck, 2019/10/22
- [PULL 8/9] s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION, Cornelia Huck, 2019/10/22
- [PULL 9/9] s390x/kvm: Set default cpu model for all machine classes, Cornelia Huck, 2019/10/22
- Re: [PULL 0/9] more s390x fixes, Peter Maydell, 2019/10/22