All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: kbastian@mail.uni-paderborn.de, sagark@eecs.berkeley.edu,
	palmer@sifive.com, peer.adelt@hni.uni-paderborn.de,
	Alistair.Francis@wdc.com, mjc@sifive.com
Subject: [Qemu-devel] [PATCH 0/7] riscv decodetree followup
Date: Tue, 23 Oct 2018 13:04:47 +0100	[thread overview]
Message-ID: <20181023120454.28553-1-richard.henderson@linaro.org> (raw)

The first patch is the promised change to argument sets to allow
them to be shared between two decoders.

Then I set about trying to use this... and ran into some other
interesting problems.  The first of which is that 

  bool trans_add(DecodeContext *ctx, struct arg_r *a, uint32_t insn);
  bool trans_add(DecodeContext *ctx, struct arg_r *a, uint16_t insn);

conflicts.

I think the best solution is to remove the insn argument to the
trans_* functions.  When this goes in for real, this will be
a big patch that touches lots of lines in target/arm and target/openrisc.
For now, I'm ignoring that and only building riscv{32,64}-linux-user.

Second, it occured to me that if we smoosh several files together
at build time, we don't have to play silly games with trying to
decode for riscv32 and riscv64 at the same time.  The last patch is,
I think, a big improvement in that.

Full tree at https://github.com/rth7680/qemu.git riscv-dt-rth.


r~


Richard Henderson (7):
  decodetree: Add !extern flag to argument sets
  decodetree: Remove "insn" argument from trans_* expanders
  target/riscv: Update for decodetree insn argument change
  target/riscv: Rename some argument sets in insn32.decode
  target/riscv: Convert @cs_2 insns to share translation functions
  target/riscv: Convert @cl_d, @cl_w, @cs_d, @cs_w insns
  target/riscv: Splice decodetree inputs for riscv32 vs riscv64

 .../riscv/insn_trans/trans_privileged.inc.c   |  19 +-
 target/riscv/insn_trans/trans_rva.inc.c       |  90 ++------
 target/riscv/insn_trans/trans_rvc.inc.c       | 215 ++++--------------
 target/riscv/insn_trans/trans_rvd.inc.c       |  90 +++-----
 target/riscv/insn_trans/trans_rvf.inc.c       |  78 +++----
 target/riscv/insn_trans/trans_rvi.inc.c       | 165 ++++++--------
 target/riscv/insn_trans/trans_rvm.inc.c       |  48 ++--
 target/riscv/translate.c                      |  30 ++-
 scripts/decodetree.py                         |  39 ++--
 target/riscv/Makefile.objs                    |  23 +-
 target/riscv/insn16-32.decode                 |  31 +++
 target/riscv/insn16-64.decode                 |  33 +++
 target/riscv/insn16.decode                    |  55 ++---
 target/riscv/insn32.decode                    |  68 +-----
 target/riscv/insn64.decode                    |  71 ++++++
 15 files changed, 450 insertions(+), 605 deletions(-)
 create mode 100644 target/riscv/insn16-32.decode
 create mode 100644 target/riscv/insn16-64.decode
 create mode 100644 target/riscv/insn64.decode

-- 
2.17.2

             reply	other threads:[~2018-10-23 12:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 12:04 Richard Henderson [this message]
2018-10-23 12:04 ` [Qemu-devel] [PATCH 1/7] decodetree: Add !extern flag to argument sets Richard Henderson
2018-10-23 12:56   ` Bastian Koppelmann
2018-10-23 13:27   ` Philippe Mathieu-Daudé
2018-10-23 13:54     ` Richard Henderson
2018-10-23 18:40       ` Philippe Mathieu-Daudé
2018-10-23 12:04 ` [Qemu-devel] [PATCH 2/7] decodetree: Remove "insn" argument from trans_* expanders Richard Henderson
2018-10-23 13:04   ` Bastian Koppelmann
2018-10-23 13:08     ` Richard Henderson
2018-10-23 13:25       ` Philippe Mathieu-Daudé
2018-10-23 13:25       ` Bastian Koppelmann
2018-10-23 13:56         ` Richard Henderson
2018-10-23 12:04 ` [Qemu-devel] [PATCH 3/7] target/riscv: Update for decodetree insn argument change Richard Henderson
2018-10-23 13:40   ` Bastian Koppelmann
2018-10-23 12:04 ` [Qemu-devel] [PATCH 4/7] target/riscv: Rename some argument sets in insn32.decode Richard Henderson
2018-10-23 12:21   ` Philippe Mathieu-Daudé
2018-10-23 13:03     ` Richard Henderson
2018-10-23 13:40   ` Bastian Koppelmann
2018-10-23 12:04 ` [Qemu-devel] [PATCH 5/7] target/riscv: Convert @cs_2 insns to share translation functions Richard Henderson
2018-10-23 12:26   ` Philippe Mathieu-Daudé
2018-10-23 13:04     ` Richard Henderson
2018-10-23 13:41   ` Bastian Koppelmann
2018-10-23 12:04 ` [Qemu-devel] [PATCH 6/7] target/riscv: Convert @cl_d, @cl_w, @cs_d, @cs_w insns Richard Henderson
2018-10-23 12:27   ` Philippe Mathieu-Daudé
2018-10-23 12:04 ` [Qemu-devel] [PATCH 7/7] target/riscv: Splice decodetree inputs for riscv32 vs riscv64 Richard Henderson
2018-10-23 12:17   ` Philippe Mathieu-Daudé
2018-10-24  9:33   ` Bastian Koppelmann
2018-10-24  9:49     ` Richard Henderson

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=20181023120454.28553-1-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=Alistair.Francis@wdc.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=mjc@sifive.com \
    --cc=palmer@sifive.com \
    --cc=peer.adelt@hni.uni-paderborn.de \
    --cc=qemu-devel@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    /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.