qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/arm: Fix mtedesc for do_mem_zpz
@ 2020-07-06 20:23 Richard Henderson
  2020-07-07  2:08 ` Philippe Mathieu-Daudé
  2020-07-07 10:42 ` Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2020-07-06 20:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The mtedesc that was contructed was not actually passed in.
Found by Coverity (CID 1429996).

Fixes: d28d12f008e
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/translate-sve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 08f0fd15b2..88a2fb271d 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -5275,7 +5275,7 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm,
         desc = FIELD_DP32(desc, MTEDESC, ESIZE, 1 << msz);
         desc <<= SVE_MTEDESC_SHIFT;
     }
-    desc = simd_desc(vsz, vsz, scale);
+    desc = simd_desc(vsz, vsz, desc | scale);
     t_desc = tcg_const_i32(desc);
 
     tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg));
-- 
2.25.1



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

* Re: [PATCH] target/arm: Fix mtedesc for do_mem_zpz
  2020-07-06 20:23 [PATCH] target/arm: Fix mtedesc for do_mem_zpz Richard Henderson
@ 2020-07-07  2:08 ` Philippe Mathieu-Daudé
  2020-07-07 10:42 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-07  2:08 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: peter.maydell

On 7/6/20 10:23 PM, Richard Henderson wrote:
> The mtedesc that was contructed was not actually passed in.

Typo "constructed".

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Found by Coverity (CID 1429996).
> 
> Fixes: d28d12f008e
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/translate-sve.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
> index 08f0fd15b2..88a2fb271d 100644
> --- a/target/arm/translate-sve.c
> +++ b/target/arm/translate-sve.c
> @@ -5275,7 +5275,7 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm,
>          desc = FIELD_DP32(desc, MTEDESC, ESIZE, 1 << msz);
>          desc <<= SVE_MTEDESC_SHIFT;
>      }
> -    desc = simd_desc(vsz, vsz, scale);
> +    desc = simd_desc(vsz, vsz, desc | scale);
>      t_desc = tcg_const_i32(desc);
>  
>      tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg));
> 



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

* Re: [PATCH] target/arm: Fix mtedesc for do_mem_zpz
  2020-07-06 20:23 [PATCH] target/arm: Fix mtedesc for do_mem_zpz Richard Henderson
  2020-07-07  2:08 ` Philippe Mathieu-Daudé
@ 2020-07-07 10:42 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2020-07-07 10:42 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On Mon, 6 Jul 2020 at 21:23, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The mtedesc that was contructed was not actually passed in.
> Found by Coverity (CID 1429996).
>
> Fixes: d28d12f008e
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/translate-sve.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>


Applied to target-arm.next (with the commit message typo fixed), thanks.

-- PMM


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

end of thread, other threads:[~2020-07-07 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-06 20:23 [PATCH] target/arm: Fix mtedesc for do_mem_zpz Richard Henderson
2020-07-07  2:08 ` Philippe Mathieu-Daudé
2020-07-07 10:42 ` Peter Maydell

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).