[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/26] s390x/tcg: Simplify wfc64() handling
From: |
David Hildenbrand |
Subject: |
[PATCH v3 10/26] s390x/tcg: Simplify wfc64() handling |
Date: |
Mon, 7 Jun 2021 13:03:22 +0200 |
... and prepare for 32/128 bit support.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
target/s390x/vec_fpu_helper.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/target/s390x/vec_fpu_helper.c b/target/s390x/vec_fpu_helper.c
index 7ca9c892f7..4af59ea66c 100644
--- a/target/s390x/vec_fpu_helper.c
+++ b/target/s390x/vec_fpu_helper.c
@@ -201,8 +201,8 @@ static int wfc64(const S390Vector *v1, const S390Vector *v2,
CPUS390XState *env, bool signal, uintptr_t retaddr)
{
/* only the zero-indexed elements are compared */
- const float64 a = s390_vec_read_element64(v1, 0);
- const float64 b = s390_vec_read_element64(v2, 0);
+ const float64 a = s390_vec_read_float64(v1, 0);
+ const float64 b = s390_vec_read_float64(v2, 0);
uint8_t vxc, vec_exc = 0;
int cmp;
@@ -217,17 +217,18 @@ static int wfc64(const S390Vector *v1, const S390Vector
*v2,
return float_comp_to_cc(env, cmp);
}
-void HELPER(gvec_wfc64)(const void *v1, const void *v2, CPUS390XState *env,
- uint32_t desc)
-{
- env->cc_op = wfc64(v1, v2, env, false, GETPC());
+#define DEF_GVEC_WFC_B(NAME, SIGNAL, BITS)
\
+void HELPER(gvec_##NAME##BITS)(const void *v1, const void *v2,
\
+ CPUS390XState *env, uint32_t desc)
\
+{
\
+ env->cc_op = wfc##BITS(v1, v2, env, SIGNAL, GETPC());
\
}
-void HELPER(gvec_wfk64)(const void *v1, const void *v2, CPUS390XState *env,
- uint32_t desc)
-{
- env->cc_op = wfc64(v1, v2, env, true, GETPC());
-}
+#define DEF_GVEC_WFC(NAME, SIGNAL)
\
+ DEF_GVEC_WFC_B(NAME, SIGNAL, 64)
+
+DEF_GVEC_WFC(wfc, false)
+DEF_GVEC_WFC(wfk, true)
typedef bool (*vfc64_fn)(float64 a, float64 b, float_status *status);
static int vfc64(S390Vector *v1, const S390Vector *v2, const S390Vector *v3,
--
2.31.1
- [PATCH v3 01/26] s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling, (continued)
- [PATCH v3 01/26] s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling, David Hildenbrand, 2021/06/07
- [PATCH v3 02/26] s390x/tcg: Fix instruction name for VECTOR FP LOAD (LENGTHENED|ROUNDED), David Hildenbrand, 2021/06/07
- [PATCH v3 03/26] s390x/tcg: Simplify vop64_3() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 04/26] s390x/tcg: Simplify vop64_2() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 05/26] s390x/tcg: Simplify vfc64() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 06/26] s390x/tcg: Simplify vftci64() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 07/26] s390x/tcg: Simplify vfma64() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 08/26] s390x/tcg: Simplify vfll32() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 09/26] s390x/tcg: Simplify vflr64() handling, David Hildenbrand, 2021/06/07
- [PATCH v3 10/26] s390x/tcg: Simplify wfc64() handling,
David Hildenbrand <=
- [PATCH v3 11/26] s390x/tcg: Implement VECTOR BIT PERMUTE, David Hildenbrand, 2021/06/07
- [PATCH v3 12/26] s390x/tcg: Implement VECTOR MULTIPLY SUM LOGICAL, David Hildenbrand, 2021/06/07
- [PATCH v3 13/26] s390x/tcg: Implement 32/128 bit for VECTOR FP (ADD|DIVIDE|MULTIPLY|SUBTRACT), David Hildenbrand, 2021/06/07
- [PATCH v3 14/26] s390x/tcg: Implement 32/128 bit for VECTOR (LOAD FP INTEGER|FP SQUARE ROOT), David Hildenbrand, 2021/06/07
- [PATCH v3 15/26] s390x/tcg: Implement 32/128 bit for VECTOR FP COMPARE *, David Hildenbrand, 2021/06/07
- [PATCH v3 16/26] s390x/tcg: Implement 32/128 bit for VECTOR FP COMPARE (AND SIGNAL) SCALAR, David Hildenbrand, 2021/06/07
- [PATCH v3 17/26] s390x/tcg: Implement 64 bit for VECTOR FP LOAD LENGTHENED, David Hildenbrand, 2021/06/07
- [PATCH v3 18/26] s390x/tcg: Implement 128 bit for VECTOR FP LOAD ROUNDED, David Hildenbrand, 2021/06/07
- [PATCH v3 19/26] s390x/tcg: Implement 32/128 bit for VECTOR FP PERFORM SIGN OPERATION, David Hildenbrand, 2021/06/07
- [PATCH v3 21/26] s390x/tcg: Implement 32/128 bit for VECTOR FP MULTIPLY AND (ADD|SUBTRACT), David Hildenbrand, 2021/06/07