From: Leon Alrae <leon.alrae@imgtec.com>
To: Yongbok Kim <yongbok.kim@imgtec.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, afaerber@suse.de, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v6 1/3] target-mips: Misaligned memory accesses for R6
Date: Fri, 29 May 2015 13:33:24 +0100 [thread overview]
Message-ID: <55685C94.6020009@imgtec.com> (raw)
In-Reply-To: <1432733342-64176-2-git-send-email-yongbok.kim@imgtec.com>
On 27/05/2015 14:29, Yongbok Kim wrote:
> @@ -2143,7 +2146,8 @@ static void gen_ld(DisasContext *ctx, uint32_t opc,
> t1 = tcg_const_tl(pc_relative_pc(ctx));
> gen_op_addr_add(ctx, t0, t0, t1);
> tcg_temp_free(t1);
> - tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TEQ);
> + tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TEQ |
> + ctx->default_tcg_memop_mask);
> gen_store_gpr(t0, rt);
> opn = "ldpc";
> break;
> @@ -2152,22 +2156,26 @@ static void gen_ld(DisasContext *ctx, uint32_t opc,
> t1 = tcg_const_tl(pc_relative_pc(ctx));
> gen_op_addr_add(ctx, t0, t0, t1);
> tcg_temp_free(t1);
> - tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TESL);
> + tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TESL |
> + ctx->default_tcg_memop_mask);
> gen_store_gpr(t0, rt);
> opn = "lwpc";
> break;
As I can see in other places you skipped load/store instructions not
present in R6 spec (like pre-R6 DSP or microMIPS loads/stores), which
probably is fine. However, IIUC these two instructions LWPC and LDPC are
from mips16 ASE, so probably you want to skip them as well? (note that
for R6 we’ve got R6_OPC_LWPC and R6_OPC_LDPC and they are naturally
aligned).
Apart from that,
Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
BTW these OPC_LWPC and OPC_LDPC are very confusing... I presume these
fake instructions were created in order to reuse gen_ldst() function for
mips16 M16_OPC_LWPC and I64_LDPC instructions. It would be nice to clean
this up at some point (the same as OPC_JALRC).
Leon
next prev parent reply other threads:[~2015-05-29 12:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 13:28 [Qemu-devel] [PATCH v6 0/3] target-mips: Add support for misaligned accesses Yongbok Kim
2015-05-27 13:29 ` [Qemu-devel] [PATCH v6 1/3] target-mips: Misaligned memory accesses for R6 Yongbok Kim
2015-05-29 12:33 ` Leon Alrae [this message]
2015-06-01 8:29 ` Yongbok Kim
2015-05-27 13:29 ` [Qemu-devel] [PATCH v6 2/3] softmmu: Add probe_write() Yongbok Kim
2015-05-27 13:42 ` Peter Maydell
2015-05-27 13:29 ` [Qemu-devel] [PATCH v6 3/3] target-mips: Misaligned memory accesses for MSA Yongbok Kim
2015-05-29 15:57 ` Leon Alrae
2015-05-29 16:07 ` Leon Alrae
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=55685C94.6020009@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=afaerber@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=yongbok.kim@imgtec.com \
/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).