qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>, qemu-devel@nongnu.org
Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH v3 07/13] target/mips: Add emulation of MMI instruction PEXEW
Date: Tue, 5 Mar 2019 04:32:57 -0800	[thread overview]
Message-ID: <467c2597-c0c1-7a59-bc90-080a74be2935@linaro.org> (raw)
In-Reply-To: <1551712405-2530-8-git-send-email-mateja.marjanovic@rt-rk.com>

On 3/4/19 7:13 AM, Mateja Marjanovic wrote:
> +    } else {
> +        TCGv_i64 t0 = tcg_temp_new();
> +        TCGv_i64 t1 = tcg_temp_new();
> +        TCGv_i64 t2 = tcg_temp_new();
> +        uint64_t mask0 = (1ULL << 32) - 1;
> +        uint64_t mask1 = mask0 << 32;
> +
> +        tcg_gen_movi_i64(t1, 0);
> +        tcg_gen_andi_i64(t0, cpu_gpr[rt], mask1);
> +        tcg_gen_or_i64(t1, t0, t1);
> +        tcg_gen_andi_i64(t0, cpu_mmr[rt], mask0);
> +        tcg_gen_shri_i64(t0, t0, 64);

This line should abort, since the shift count is out of range.
Are you testing with --enable-debug-tcg?

> +        tcg_gen_or_i64(t1, t0, t1);
> +        tcg_gen_mov_i64(t2, t1);

But again, this whole thing is two deposit operations:

    tcg_gen_mov_i64(t0, cpu_gpr[rt]);
    tcg_gen_deposit_i64(cpu_gpr[rd], cpu_gpr[rt], cpu_mmr[rt], 0, 32);
    tcg_gen_deposit_i64(cpu_mmr[rd], cpu_mmr[rt], t0, 0, 32);


r~

  reply	other threads:[~2019-03-05 12:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 15:13 [Qemu-devel] [PATCH v3 00/13] target/mips: Add emulation of data communication MMI instructions Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 01/13] target/mips: Add emulation of MMI instruction PCPYH Mateja Marjanovic
2019-03-04 20:36   ` Richard Henderson
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 02/13] target/mips: Add emulation of MMI instruction PCPYLD Mateja Marjanovic
2019-03-04 20:37   ` Richard Henderson
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 03/13] target/mips: Add emulation of MMI instruction PCPYUD Mateja Marjanovic
2019-03-04 20:38   ` Richard Henderson
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 04/13] target/mips: Add emulation of MMI instruction PEXCH Mateja Marjanovic
2019-03-04 17:36   ` Aleksandar Markovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 05/13] target/mips: Add emulation of MMI instruction PEXCW Mateja Marjanovic
2019-03-04 17:56   ` Aleksandar Markovic
2019-03-04 20:43   ` Richard Henderson
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 06/13] target/mips: Add emulation of MMI instruction PEXEH Mateja Marjanovic
2019-03-04 18:27   ` Aleksandar Markovic
2019-03-05 12:25     ` Richard Henderson
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 07/13] target/mips: Add emulation of MMI instruction PEXEW Mateja Marjanovic
2019-03-05 12:32   ` Richard Henderson [this message]
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 08/13] target/mips: Add emulation of MMI instruction PEXTLB Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 09/13] target/mips: Add emulation of MMI instruction PEXTLH Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 10/13] target/mips: Add emulation of MMI instruction PEXTLW Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 11/13] target/mips: Add emulation of MMI instruction PEXTUB Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 12/13] target/mips: Add emulation of MMI instruction PEXTUH Mateja Marjanovic
2019-03-04 15:13 ` [Qemu-devel] [PATCH v3 13/13] target/mips: Add emulation of MMI instruction PEXTUW Mateja Marjanovic

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=467c2597-c0c1-7a59-bc90-080a74be2935@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=mateja.marjanovic@rt-rk.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).