Patchwork [2/4] target-arm: neon vshll instruction fix

login
register
mail settings
Submitter Riku Voipio
Date Feb. 5, 2010, 3:52 p.m.
Message ID <1265385151-11024-3-git-send-email-riku.voipio@iki.fi>
Download mbox | patch
Permalink /patch/44654/
State New
Headers show

Comments

Riku Voipio - Feb. 5, 2010, 3:52 p.m.
From: Juha Riihimäki <juha.riihimaki@nokia.com>

implementation only widened the 32bit source vector elements into a
64bit destination vector but forgot to perform the actual shifting
operation.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
---
 target-arm/translate.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Laurent Desnogues - Feb. 7, 2010, 12:51 p.m.
On Fri, Feb 5, 2010 at 4:52 PM, Riku Voipio <riku.voipio@iki.fi> wrote:
> From: Juha Riihimäki <juha.riihimaki@nokia.com>
>
> implementation only widened the 32bit source vector elements into a
> 64bit destination vector but forgot to perform the actual shifting
> operation.
>
> Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>

Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>


Laurent

> ---
>  target-arm/translate.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 4bd813a..537d9d6 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -5385,6 +5385,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
>                         if (pass == 1)
>                             tmp = tmp2;
>                         gen_neon_widen(cpu_V0, tmp, size, 1);
> +                        tcg_gen_shli_i64(cpu_V0, cpu_V0, 8 << size);
>                         neon_store_reg64(cpu_V0, rd + pass);
>                     }
>                     break;
> --
> 1.6.5
>
>
>
>
Aurelien Jarno - Feb. 28, 2010, 6:33 p.m.
On Fri, Feb 05, 2010 at 03:52:29PM +0000, Riku Voipio wrote:
> From: Juha Riihimäki <juha.riihimaki@nokia.com>
> 
> implementation only widened the 32bit source vector elements into a
> 64bit destination vector but forgot to perform the actual shifting
> operation.
> 
> Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>

Thanks, applied.

> ---
>  target-arm/translate.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 4bd813a..537d9d6 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -5385,6 +5385,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
>                          if (pass == 1)
>                              tmp = tmp2;
>                          gen_neon_widen(cpu_V0, tmp, size, 1);
> +                        tcg_gen_shli_i64(cpu_V0, cpu_V0, 8 << size);
>                          neon_store_reg64(cpu_V0, rd + pass);
>                      }
>                      break;
> -- 
> 1.6.5
> 
> 
> 
>

Patch

diff --git a/target-arm/translate.c b/target-arm/translate.c
index 4bd813a..537d9d6 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -5385,6 +5385,7 @@  static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
                         if (pass == 1)
                             tmp = tmp2;
                         gen_neon_widen(cpu_V0, tmp, size, 1);
+                        tcg_gen_shli_i64(cpu_V0, cpu_V0, 8 << size);
                         neon_store_reg64(cpu_V0, rd + pass);
                     }
                     break;