Skip to content

Commit

Permalink
target/arm: Fix SME FMOPA (16-bit), BFMOPA
Browse files Browse the repository at this point in the history
Perform the loop increment unconditionally, not nested
within the predication.

Cc: qemu-stable@nongnu.org
Fixes: 3916841 ("target/arm: Implement FMOPA, FMOPS (widening)")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1985
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231117193135.1180657-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 3efd849)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
rth7680 authored and Michael Tokarev committed Nov 22, 2023
1 parent d8ad972 commit db8e86c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions target/arm/tcg/sme_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,10 +1037,9 @@ void HELPER(sme_fmopa_h)(void *vza, void *vzn, void *vzm, void *vpn,

m = f16mop_adj_pair(m, pcol, 0);
*a = f16_dotadd(*a, n, m, &fpst_std, &fpst_odd);

col += 4;
pcol >>= 4;
}
col += 4;
pcol >>= 4;
} while (col & 15);
}
row += 4;
Expand Down Expand Up @@ -1073,10 +1072,9 @@ void HELPER(sme_bfmopa)(void *vza, void *vzn, void *vzm, void *vpn,

m = f16mop_adj_pair(m, pcol, 0);
*a = bfdotadd(*a, n, m);

col += 4;
pcol >>= 4;
}
col += 4;
pcol >>= 4;
} while (col & 15);
}
row += 4;
Expand Down

0 comments on commit db8e86c

Please sign in to comment.