diff mbox series

[for-4.1,1/8] target/riscv: Name the argument sets for all of insn32 formats

Message ID 20190401031155.21293-2-richard.henderson@linaro.org
State New
Headers show
Series target/riscv: decodetree improvments | expand

Commit Message

Richard Henderson April 1, 2019, 3:11 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/riscv/insn32.decode | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Alistair Francis April 3, 2019, 11:27 p.m. UTC | #1
On Sun, Mar 31, 2019 at 8:12 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Alistair Francis <alistair.francis@wdc.com>


Alistair

> ---

>  target/riscv/insn32.decode | 10 +++++++---

>  1 file changed, 7 insertions(+), 3 deletions(-)

>

> diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode

> index 6f3ab7aa52..77f794ed70 100644

> --- a/target/riscv/insn32.decode

> +++ b/target/riscv/insn32.decode

> @@ -34,9 +34,13 @@

>  %imm_u    12:s20                 !function=ex_shift_12

>

>  # Argument sets:

> +&empty

>  &b    imm rs2 rs1

>  &i    imm rs1 rd

> +&j    imm rd

>  &r    rd rs1 rs2

> +&s    imm rs1 rs2

> +&u    imm rd

>  &shift     shamt rs1 rd

>  &atomic    aq rl rs2 rs1 rd

>

> @@ -44,9 +48,9 @@

>  @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

> +@s       .......   ..... ..... ... ..... ....... &s      imm=%imm_s %rs2 %rs1

> +@u       ....................      ..... ....... &u      imm=%imm_u          %rd

> +@j       ....................      ..... ....... &j      imm=%imm_j          %rd

>

>  @sh      ......  ...... .....  ... ..... ....... &shift  shamt=%sh10      %rs1 %rd

>  @csr     ............   .....  ... ..... .......               %csr     %rs1 %rd

> --

> 2.17.1

>

>
Palmer Dabbelt April 25, 2019, 3:31 a.m. UTC | #2
On Sun, 31 Mar 2019 20:11:48 PDT (-0700), richard.henderson@linaro.org wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  target/riscv/insn32.decode | 10 +++++++---

>  1 file changed, 7 insertions(+), 3 deletions(-)

>

> diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode

> index 6f3ab7aa52..77f794ed70 100644

> --- a/target/riscv/insn32.decode

> +++ b/target/riscv/insn32.decode

> @@ -34,9 +34,13 @@

>  %imm_u    12:s20                 !function=ex_shift_12

>

>  # Argument sets:

> +&empty


If I understand decodetree correctly, this isn't used until patch 5.
Otherwise,

Reviewed-by: Palmer Dabbelt <palmer@sifive.com>


I don't care enough about this to make you re-spin the patch set, so I'm OK
taking it as it stands unless there's anything else that crops up as I look
through the rest of the patches...

Thanks!

>  &b    imm rs2 rs1

>  &i    imm rs1 rd

> +&j    imm rd

>  &r    rd rs1 rs2

> +&s    imm rs1 rs2

> +&u    imm rd

>  &shift     shamt rs1 rd

>  &atomic    aq rl rs2 rs1 rd

>

> @@ -44,9 +48,9 @@

>  @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

> +@s       .......   ..... ..... ... ..... ....... &s      imm=%imm_s %rs2 %rs1

> +@u       ....................      ..... ....... &u      imm=%imm_u          %rd

> +@j       ....................      ..... ....... &j      imm=%imm_j          %rd

>

>  @sh      ......  ...... .....  ... ..... ....... &shift  shamt=%sh10      %rs1 %rd

>  @csr     ............   .....  ... ..... .......               %csr     %rs1 %rd
Richard Henderson April 25, 2019, 5:16 a.m. UTC | #3
On 4/24/19 8:31 PM, Palmer Dabbelt wrote:
>>  # Argument sets:

>> +&empty

> 

> If I understand decodetree correctly, this isn't used until patch 5.

> Otherwise,

> 


I think it's used as early as patch 3, but I haven't looked in detail to be sure.


r~
Aleksandar Markovic April 25, 2019, 5:31 a.m. UTC | #4
On Apr 25, 2019 7:17 AM, "Richard Henderson" <richard.henderson@linaro.org>
wrote:
>

> On 4/24/19 8:31 PM, Palmer Dabbelt wrote:

> >>  # Argument sets:

> >> +&empty

> >

> > If I understand decodetree correctly, this isn't used until patch 5.

> > Otherwise,

> >

>

> I think it's used as early as patch 3, but I haven't looked in detail to

be sure.
>

>

> r~

>


I think it is a very bad practice to leave the commit message empty, and,
in my view, the long-time contributor, like you, Richard, have the
obligation to always give examples of commit messages of good quality.
Leaving empty commit messages should not be a ”privelage” that comes with
seniority, IMHO. On the contrary.

Sincerely,
Aleksandar
diff mbox series

Patch

diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode
index 6f3ab7aa52..77f794ed70 100644
--- a/target/riscv/insn32.decode
+++ b/target/riscv/insn32.decode
@@ -34,9 +34,13 @@ 
 %imm_u    12:s20                 !function=ex_shift_12
 
 # Argument sets:
+&empty
 &b    imm rs2 rs1
 &i    imm rs1 rd
+&j    imm rd
 &r    rd rs1 rs2
+&s    imm rs1 rs2
+&u    imm rd
 &shift     shamt rs1 rd
 &atomic    aq rl rs2 rs1 rd
 
@@ -44,9 +48,9 @@ 
 @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
+@s       .......   ..... ..... ... ..... ....... &s      imm=%imm_s %rs2 %rs1
+@u       ....................      ..... ....... &u      imm=%imm_u          %rd
+@j       ....................      ..... ....... &j      imm=%imm_j          %rd
 
 @sh      ......  ...... .....  ... ..... ....... &shift  shamt=%sh10      %rs1 %rd
 @csr     ............   .....  ... ..... .......               %csr     %rs1 %rd