From: Richard Henderson <richard.henderson@linaro.org>
To: Luis Pires <luis.pires@eldorado.org.br>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: lagarcia@br.ibm.com, bruno.larsen@eldorado.org.br,
matheus.ferst@eldorado.org.br, f4bug@amsat.org,
david@gibson.dropbear.id.au
Subject: Re: [PATCH 5/5] target/ppc: Implement paddi and replace addi insns
Date: Thu, 15 Apr 2021 09:59:08 -0700 [thread overview]
Message-ID: <d91d897a-bfb0-80ee-e5ff-85668e997705@linaro.org> (raw)
In-Reply-To: <35a37fdc-0580-7c0b-5748-1f194386007c@linaro.org>
On 4/14/21 12:11 PM, Richard Henderson wrote:
> This approach seems like it will work fine for MLS and MMIR prefixes. For 8LS,
> 8RR, and MRR prefixes, we'll need some extra help within ppc_tr_translate_insn.
> E.g.
>
> insn = translator_ldl_swap(env, ctx->base.pc_next,
> need_byteswap(ctx));
> switch (ctx->prefix_type) {
> case PREFIX_NONE:
> ok = decode_opcode_space_0(ctx, insn) ||
> decode_legacy(ctx, insn);
> break;
> case PREFIX_MLS:
> case PREFIX_MMIRR:
> ok = decode_opcode_space_0(ctx, insn);
> break;
I played about with this last night, and there's an interesting trade-off:
(1) The thousands of 32-bit insns which do not allow prefixes
now each require 3 lines to assert that no prefix is present,
(2) There are only 12 MLS and 29 MMIRR prefixed insns.
I think it may well be that eliminating boiler-plate from thousands of insns it
a good trade-off to special-casing 41 insns.
At which point, considering the multiple variations on 8RR and MMIRR prefixes,
seems to indicate that we should decode all 64 bits all at once.
r~
prev parent reply other threads:[~2021-04-15 17:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 21:11 [PATCH 0/5] Base for adding PowerPC 64-bit instructions Luis Pires
2021-04-13 21:11 ` [PATCH 1/5] decodetree: Add support for " Luis Pires
2021-04-13 21:11 ` [PATCH 2/5] decodetree: Fix empty input files for varinsnwidth Luis Pires
2021-04-14 19:47 ` Richard Henderson
2021-04-13 21:11 ` [PATCH 3/5] decodetree: Allow custom var width load functions Luis Pires
2021-04-13 21:11 ` [PATCH 4/5] target/ppc: Base changes to allow 32/64-bit insns Luis Pires
2021-04-14 15:26 ` Richard Henderson
2021-04-14 16:09 ` Richard Henderson
2021-04-14 16:10 ` Richard Henderson
2021-04-13 21:11 ` [PATCH 5/5] target/ppc: Implement paddi and replace addi insns Luis Pires
2021-04-13 22:41 ` Philippe Mathieu-Daudé
2021-04-14 13:00 ` Luis Fernando Fujita Pires
2021-04-14 19:11 ` Richard Henderson
2021-04-14 23:07 ` Richard Henderson
2021-04-15 16:59 ` Richard Henderson [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=d91d897a-bfb0-80ee-e5ff-85668e997705@linaro.org \
--to=richard.henderson@linaro.org \
--cc=bruno.larsen@eldorado.org.br \
--cc=david@gibson.dropbear.id.au \
--cc=f4bug@amsat.org \
--cc=lagarcia@br.ibm.com \
--cc=luis.pires@eldorado.org.br \
--cc=matheus.ferst@eldorado.org.br \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).