[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/71] target/arm: Export bfdotadd from vec_helper.c
From: |
Richard Henderson |
Subject: |
[PATCH 18/71] target/arm: Export bfdotadd from vec_helper.c |
Date: |
Thu, 2 Jun 2022 14:48:00 -0700 |
We will need this over in sme_helper.c.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/vec_internal.h | 13 +++++++++++++
target/arm/vec_helper.c | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/target/arm/vec_internal.h b/target/arm/vec_internal.h
index 1d527fadac..1f4ed80ff7 100644
--- a/target/arm/vec_internal.h
+++ b/target/arm/vec_internal.h
@@ -230,4 +230,17 @@ uint64_t pmull_h(uint64_t op1, uint64_t op2);
*/
uint64_t pmull_w(uint64_t op1, uint64_t op2);
+/**
+ * bfdotadd:
+ * @sum: addend
+ * @e1, @e2: multiplicand vectors
+ *
+ * BFloat16 2-way dot product of @e1 & @e2, accumulating with @sum.
+ * The @e1 and @e2 operands correspond to the 32-bit source vector
+ * slots and contain two Bfloat16 values each.
+ *
+ * Corresponds to the ARM pseudocode function BFDotAdd.
+ */
+float32 bfdotadd(float32 sum, uint32_t e1, uint32_t e2);
+
#endif /* TARGET_ARM_VEC_INTERNAL_H */
diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
index 26c373e522..9a9c034e36 100644
--- a/target/arm/vec_helper.c
+++ b/target/arm/vec_helper.c
@@ -2557,7 +2557,7 @@ DO_MMLA_B(gvec_usmmla_b, do_usmmla_b)
* BFloat16 Dot Product
*/
-static float32 bfdotadd(float32 sum, uint32_t e1, uint32_t e2)
+float32 bfdotadd(float32 sum, uint32_t e1, uint32_t e2)
{
/* FPCR is ignored for BFDOT and BFMMLA. */
float_status bf_status = {
--
2.34.1
- [PATCH 16/71] target/arm: Use expand_pred_b in mve_helper.c, (continued)
- [PATCH 16/71] target/arm: Use expand_pred_b in mve_helper.c, Richard Henderson, 2022/06/02
- [PATCH 17/71] target/arm: Move expand_pred_h to vec_internal.h, Richard Henderson, 2022/06/02
- [PATCH 20/71] target/arm: Add ID_AA64SMFR0_EL1, Richard Henderson, 2022/06/02
- [PATCH 22/71] target/arm: Add SMEEXC_EL to TB flags, Richard Henderson, 2022/06/02
- [PATCH 28/71] target/arm: Add PSTATE.{SM,ZA} to TB flags, Richard Henderson, 2022/06/02
- [PATCH 18/71] target/arm: Export bfdotadd from vec_helper.c,
Richard Henderson <=
- [PATCH 19/71] target/arm: Add isar_feature_aa64_sme, Richard Henderson, 2022/06/02
- [PATCH 14/71] target/arm: Export sve contiguous ldst support functions, Richard Henderson, 2022/06/02
- [PATCH 21/71] target/arm: Implement TPIDR2_EL0, Richard Henderson, 2022/06/02
- [PATCH 23/71] target/arm: Add syn_smetrap, Richard Henderson, 2022/06/02
- [PATCH 25/71] target/arm: Add SVCR, Richard Henderson, 2022/06/02