qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 48/82] target/arm: Pass separate addend to {U, S}DOT helpe


From: Richard Henderson
Subject: Re: [PATCH v6 48/82] target/arm: Pass separate addend to {U, S}DOT helpers
Date: Fri, 14 May 2021 11:33:22 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/13/21 5:47 AM, Peter Maydell wrote:
On Fri, 30 Apr 2021 at 21:57, Richard Henderson
<richard.henderson@linaro.org> wrote:

For SVE, we potentially have a 4th argument coming from the
movprfx instruction.  Currently we do not optimize movprfx,
so the problem is not visible.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
v4: Fix double addition (zhiwei).
---
  target/arm/helper.h         |  20 +++---
  target/arm/sve.decode       |   7 ++-
  target/arm/translate-a64.c  |  15 ++++-
  target/arm/translate-neon.c |  10 +--
  target/arm/translate-sve.c  |  13 ++--
  target/arm/vec_helper.c     | 120 ++++++++++++++++++++----------------
  6 files changed, 109 insertions(+), 76 deletions(-)

diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
index a3d80ecad0..f88e572132 100644
--- a/target/arm/vec_helper.c
+++ b/target/arm/vec_helper.c
@@ -375,71 +375,76 @@ void HELPER(sve2_sqrdmlsh_d)(void *vd, void *vn, void *vm,
   * All elements are treated equally, no matter where they are.
   */

-void HELPER(gvec_sdot_b)(void *vd, void *vn, void *vm, uint32_t desc)
+void HELPER(gvec_sdot_b)(void *vd, void *vn, void *vm, void *va, uint32_t desc)
  {
      intptr_t i, opr_sz = simd_oprsz(desc);
-    uint32_t *d = vd;
+    int32_t *d = vd, *a = va;

Why the type change ?

Oh, just because this is logically producing a signed result. Given that we use -fwrapv, there is no functional change.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]