qemu-devel.nongnu.org archive mirror
 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 4/7] target/riscv: Rename some argument sets in insn32.decode
Date: Tue, 23 Oct 2018 13:04:51 +0100	[thread overview]
Message-ID: <20181023120454.28553-5-richard.henderson@linaro.org> (raw)
In-Reply-To: <20181023120454.28553-1-richard.henderson@linaro.org>

For format x, use &x for the argument set and @x for the extract.
This is less confusing than e.g. "arith" for format R.
---
 target/riscv/insn_trans/trans_rvi.inc.c |  2 +-
 target/riscv/translate.c                | 10 +++++-----
 target/riscv/insn32.decode              | 12 ++++++------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/riscv/insn_trans/trans_rvi.inc.c b/target/riscv/insn_trans/trans_rvi.inc.c
index 2ef355019d..7e676fe2e4 100644
--- a/target/riscv/insn_trans/trans_rvi.inc.c
+++ b/target/riscv/insn_trans/trans_rvi.inc.c
@@ -72,7 +72,7 @@ static bool trans_jalr(DisasContext *ctx, arg_jalr *a)
     return true;
 }
 
-static bool gen_branch(DisasContext *ctx, arg_branch *a, TCGCond cond)
+static bool gen_branch(DisasContext *ctx, arg_b *a, TCGCond cond)
 {
     TCGLabel *l = gen_new_label();
     TCGv source1, source2;
diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index ece163e69f..e7fe8720ac 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -326,7 +326,7 @@ bool decode_insn32(DisasContext *ctx, uint32_t insn);
 /* Include the auto-generated decoder for 32 bit insn */
 #include "decode_insn32.inc.c"
 
-static bool gen_arith_imm(DisasContext *ctx, arg_arith_imm *a,
+static bool gen_arith_imm(DisasContext *ctx, arg_i *a,
                           void(*func)(TCGv, TCGv, TCGv))
 {
     TCGv source1, source2;
@@ -344,7 +344,7 @@ static bool gen_arith_imm(DisasContext *ctx, arg_arith_imm *a,
     return true;
 }
 
-static bool gen_arith(DisasContext *ctx, arg_arith *a,
+static bool gen_arith(DisasContext *ctx, arg_r *a,
                       void(*func)(TCGv, TCGv, TCGv))
 {
     TCGv source1, source2;
@@ -363,7 +363,7 @@ static bool gen_arith(DisasContext *ctx, arg_arith *a,
 }
 
 #ifdef TARGET_RISCV64
-static bool gen_arith_w(DisasContext *ctx, arg_arith *a,
+static bool gen_arith_w(DisasContext *ctx, arg_r *a,
                         void(*func)(TCGv, TCGv, TCGv))
 {
     TCGv source1, source2;
@@ -384,8 +384,8 @@ static bool gen_arith_w(DisasContext *ctx, arg_arith *a,
 }
 #endif
 
-static bool gen_shift(DisasContext *ctx, arg_arith *a,
-                        void(*func)(TCGv, TCGv, TCGv))
+static bool gen_shift(DisasContext *ctx, arg_r *a,
+                      void(*func)(TCGv, TCGv, TCGv))
 {
     TCGv source1 = tcg_temp_new();
     TCGv source2 = tcg_temp_new();
diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode
index 1541c254df..77e093a060 100644
--- a/target/riscv/insn32.decode
+++ b/target/riscv/insn32.decode
@@ -38,17 +38,17 @@
 %imm_u    12:s20                 !function=ex_shift_12
 
 # Argument sets:
-&branch    imm rs2 rs1
-&arith_imm imm rs1 rd
-&arith     rd rs1 rs2
+&b         imm rs2 rs1
+&i         imm rs1 rd
+&r         rd rs1 rs2
 &shift     shamt rs1 rd
 &atomic    aq rl rs2 rs1 rd
 
 # Formats 32:
 
-@r       .......   ..... ..... ... ..... ....... &arith            %rs2 %rs1 %rd
-@i       ............    ..... ... ..... ....... &arith_imm imm=%imm_i  %rs1 %rd
-@b       .......   ..... ..... ... ..... ....... &branch imm=%imm_b %rs2 %rs1
+@r       .......   ..... ..... ... ..... ....... &r    %rs2 %rs1 %rd
+@i       ............    ..... ... ..... ....... &i    imm=%imm_i %rs1 %rd
+@b       .......   ..... ..... ... ..... ....... &b    imm=%imm_b %rs2 %rs1
 @s       .......   ..... ..... ... ..... .......         imm=%imm_s %rs2 %rs1
 @u       ....................      ..... .......         imm=%imm_u          %rd
 @j       ....................      ..... .......         imm=%imm_j          %rd
-- 
2.17.2

  parent 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 [Qemu-devel] [PATCH 0/7] riscv decodetree followup Richard Henderson
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 ` Richard Henderson [this message]
2018-10-23 12:21   ` [Qemu-devel] [PATCH 4/7] target/riscv: Rename some argument sets in insn32.decode 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-5-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 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).