All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Will Newton <will.newton@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] target-arm: Implement ARMv8 VSEL instruction.
Date: Thu, 03 Oct 2013 12:31:37 +0100	[thread overview]
Message-ID: <p1mwmqbnfq.fsf@linaro.org> (raw)
In-Reply-To: <524D3FAF.7020701@linaro.org>


will.newton@linaro.org writes:

<snip>
> @@ -6756,6 +6864,13 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s)
>                  goto illegal_op;
>              return;
>          }
> +	if ((insn & 0x0f800e50) == 0x0e000a00) {
> +	    /* ARMv8 VFP.  */
> +	    ARCH(8);
> +
> +	    if (disas_v8vfp_insn(env, s, insn))
> +		goto illegal_op;
> +	}
>          if (((insn & 0x0f30f000) == 0x0510f000) ||
>              ((insn & 0x0f30f010) == 0x0710f000)) {
>              if ((insn & (1 << 22)) == 0) {
> @@ -8768,6 +8883,12 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
>              insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28);
>              if (disas_neon_data_insn(env, s, insn))
>                  goto illegal_op;
> +	} else if ((insn & 0x0f800e50) == 0x0e000a00) {
> +	    /* ARMv8 VFP.  */
> +	    ARCH(8);
> +
> +	    if (disas_v8vfp_insn(env, s, insn))
> +		goto illegal_op;
>          } else {
>              if (insn & (1 << 28))
>                  goto illegal_op;

I wonder is there a better way to deal with these masks for checking
instruction type? I only mention it because the same constant is used
twice and should it ever be changed there is a risk of one being missed
(although conceivably thumb encoding could be different?).

I appreciate the disassembler code is already a mass of magic constants
so it's not a major thing for me.

Cheers,


-- 
Alex Bennée

  reply	other threads:[~2013-10-03 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  9:58 [Qemu-devel] [PATCH] target-arm: Implement ARMv8 VSEL instruction Will Newton
2013-10-03 11:31 ` Alex Bennée [this message]
2013-10-03 12:11   ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2013-06-18 14:30 [Qemu-devel] [PATCH] target-arm: implement " Mans Rullgard
2013-06-20 19:23 ` Peter Maydell
2013-06-20 23:25   ` Måns Rullgård
2013-07-02 12:56     ` 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=p1mwmqbnfq.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=will.newton@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.