qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tcg: Fix out-of-line generic vector compares
@ 2018-04-06  1:00 Richard Henderson
  2018-04-06  2:23 ` Emilio G. Cota
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2018-04-06  1:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Emilio G . Cota, thuth, alex.bennee

A mistake in the type passed to sizeof, that happens to work
when the out-of-line fallback itself is using host vectors,
but fails when using only the base types.

Reported-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 accel/tcg/tcg-runtime-gvec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c
index 8bf8d63912..90340e56e0 100644
--- a/accel/tcg/tcg-runtime-gvec.c
+++ b/accel/tcg/tcg-runtime-gvec.c
@@ -705,7 +705,7 @@ void HELPER(NAME)(void *d, void *a, void *b, uint32_t desc)                \
 {                                                                          \
     intptr_t oprsz = simd_oprsz(desc);                                     \
     intptr_t i;                                                            \
-    for (i = 0; i < oprsz; i += sizeof(vec64)) {                           \
+    for (i = 0; i < oprsz; i += sizeof(TYPE)) {                            \
         *(TYPE *)(d + i) = DO_CMP0(*(TYPE *)(a + i) OP *(TYPE *)(b + i));  \
     }                                                                      \
     clear_high(d, oprsz, desc);                                            \
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg: Fix out-of-line generic vector compares
  2018-04-06  1:00 [Qemu-devel] [PATCH] tcg: Fix out-of-line generic vector compares Richard Henderson
@ 2018-04-06  2:23 ` Emilio G. Cota
  0 siblings, 0 replies; 2+ messages in thread
From: Emilio G. Cota @ 2018-04-06  2:23 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, peter.maydell, thuth, alex.bennee

On Fri, Apr 06, 2018 at 11:00:15 +1000, Richard Henderson wrote:
> A mistake in the type passed to sizeof, that happens to work
> when the out-of-line fallback itself is using host vectors,
> but fails when using only the base types.
> 
> Reported-by: Emilio G. Cota <cota@braap.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Tested-by: Emilio G. Cota <cota@braap.org>

Thanks!

		Emilio

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-06  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-06  1:00 [Qemu-devel] [PATCH] tcg: Fix out-of-line generic vector compares Richard Henderson
2018-04-06  2:23 ` Emilio G. Cota

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).