qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Leon Alrae <leon.alrae@imgtec.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-mips: add missing restriction in DAUI instruction
Date: Mon, 14 Sep 2015 21:19:18 +0200	[thread overview]
Message-ID: <20150914191918.GA26503@aurel32.net> (raw)
In-Reply-To: <1442234994-15841-1-git-send-email-leon.alrae@imgtec.com>

On 2015-09-14 13:49, Leon Alrae wrote:
> rs cannot be the zero register, Reserved Instruction exception must be
> signalled for this case.
> 
> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
> ---
>  target-mips/translate.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 7fb7c01..a8fd4a3 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -19512,7 +19512,9 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
>  #if defined(TARGET_MIPS64)
>              /* OPC_DAUI */
>              check_mips_64(ctx);
> -            if (rt != 0) {
> +            if (rs == 0) {
> +                generate_exception(ctx, EXCP_RI);
> +            } else if (rt != 0) {
>                  TCGv t0 = tcg_temp_new();
>                  gen_load_gpr(t0, rs);
>                  tcg_gen_addi_tl(cpu_gpr[rt], t0, imm << 16);

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

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

      reply	other threads:[~2015-09-14 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 12:49 [Qemu-devel] [PATCH] target-mips: add missing restriction in DAUI instruction Leon Alrae
2015-09-14 19:19 ` Aurelien Jarno [this message]

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=20150914191918.GA26503@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=leon.alrae@imgtec.com \
    --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).