qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ARM: Fix decoding of VQSHL/VQSHLU immediate forms
Date: Tue, 4 Jan 2011 23:05:06 +0100	[thread overview]
Message-ID: <20110104220506.GC15256@volta.aurel32.net> (raw)
In-Reply-To: <1294071648-2182-3-git-send-email-peter.maydell@linaro.org>

On Mon, Jan 03, 2011 at 04:20:48PM +0000, Peter Maydell wrote:
> From: Juha Riihimäki <juha.riihimaki@nokia.com>
> 
> Fix errors in the decoding of ARM VQSHL/VQSHLU immediate forms,
> including using the new VQSHLU helper functions where appropriate.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>

> ---
>  target-arm/translate.c |   51 +++++++++++++++++++++++++++++++++--------------
>  1 files changed, 36 insertions(+), 15 deletions(-)
> 
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 2598268..1853b5c 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -4647,14 +4647,22 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
>                          case 5: /* VSHL, VSLI */
>                              gen_helper_neon_shl_u64(cpu_V0, cpu_V0, cpu_V1);
>                              break;
> -                        case 6: /* VQSHL */
> -                            if (u)
> -                                gen_helper_neon_qshl_u64(cpu_V0, cpu_env, cpu_V0, cpu_V1);
> -                            else
> -                                gen_helper_neon_qshl_s64(cpu_V0, cpu_env, cpu_V0, cpu_V1);
> +                        case 6: /* VQSHLU */
> +                            if (u) {
> +                                gen_helper_neon_qshlu_s64(cpu_V0, cpu_env,
> +                                                          cpu_V0, cpu_V1);
> +                            } else {
> +                                return 1;
> +                            }
>                              break;
> -                        case 7: /* VQSHLU */
> -                            gen_helper_neon_qshl_u64(cpu_V0, cpu_env, cpu_V0, cpu_V1);
> +                        case 7: /* VQSHL */
> +                            if (u) {
> +                                gen_helper_neon_qshl_u64(cpu_V0, cpu_env,
> +                                                         cpu_V0, cpu_V1);
> +                            } else {
> +                                gen_helper_neon_qshl_s64(cpu_V0, cpu_env,
> +                                                         cpu_V0, cpu_V1);
> +                            }
>                              break;
>                          }
>                          if (op == 1 || op == 3) {
> @@ -4693,17 +4701,30 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
>                              default: return 1;
>                              }
>                              break;
> -                        case 6: /* VQSHL */
> -                            GEN_NEON_INTEGER_OP_ENV(qshl);
> -                            break;
> -                        case 7: /* VQSHLU */
> +                        case 6: /* VQSHLU */
> +                            if (!u) {
> +                                return 1;
> +                            }
>                              switch (size) {
> -                            case 0: gen_helper_neon_qshl_u8(tmp, cpu_env, tmp, tmp2); break;
> -                            case 1: gen_helper_neon_qshl_u16(tmp, cpu_env, tmp, tmp2); break;
> -                            case 2: gen_helper_neon_qshl_u32(tmp, cpu_env, tmp, tmp2); break;
> -                            default: return 1;
> +                            case 0:
> +                                gen_helper_neon_qshlu_s8(tmp, cpu_env,
> +                                                         tmp, tmp2);
> +                                break;
> +                            case 1:
> +                                gen_helper_neon_qshlu_s16(tmp, cpu_env,
> +                                                          tmp, tmp2);
> +                                break;
> +                            case 2:
> +                                gen_helper_neon_qshlu_s32(tmp, cpu_env,
> +                                                          tmp, tmp2);
> +                                break;
> +                            default:
> +                                return 1;
>                              }
>                              break;
> +                        case 7: /* VQSHL */
> +                            GEN_NEON_INTEGER_OP_ENV(qshl);
> +                            break;
>                          }
>                          dead_tmp(tmp2);
>  
> -- 
> 1.6.3.3
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2011-01-04 22:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 16:20 [Qemu-devel] [PATCH 0/2] ARM: Fix VQSHL/VQSHLU immediate forms Peter Maydell
2011-01-03 16:20 ` [Qemu-devel] [PATCH 1/2] ARM: add neon helpers for VQSHLU Peter Maydell
2011-01-04 22:04   ` Aurelien Jarno
2011-01-03 16:20 ` [Qemu-devel] [PATCH 2/2] ARM: Fix decoding of VQSHL/VQSHLU immediate forms Peter Maydell
2011-01-04 22:05   ` Aurelien Jarno [this message]
2011-01-03 16:52 ` [Qemu-devel] [PATCH 0/2] ARM: Fix " Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110104220506.GC15256@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).