aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-06-08 19:38:58 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-06-08 19:38:58 +0100
commit72db2aa353a98bd3486c9e5ef7e31ae7cf934849 (patch)
tree85d8ca620e72e83f76f42b640ba5ea54f72ebc98
parenta613cf2d4ae61fbcdf084103ea10de193bfbe169 (diff)
downloadqemu-72db2aa353a98bd3486c9e5ef7e31ae7cf934849.zip
qemu-72db2aa353a98bd3486c9e5ef7e31ae7cf934849.tar.gz
qemu-72db2aa353a98bd3486c9e5ef7e31ae7cf934849.tar.bz2
target/arm: Export bfdotadd from vec_helper.c
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> Message-id: 20220607203306.657998-19-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/vec_helper.c2
-rw-r--r--target/arm/vec_internal.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
index 26c373e..9a9c034 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 = {
diff --git a/target/arm/vec_internal.h b/target/arm/vec_internal.h
index 1d527fa..1f4ed80 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 */