Re: [PATCH 24/56] disas/riscv: Remove rvcd_imm_nz

Alistair <[email protected]>
Newsgroups org.nongnu.qemu-riscv,org.nongnu.qemu-devel
Message-ID <[email protected]>
On Sun, 2026-08-09 at 15:35 -0700, Richard Henderson wrote:
> Remove rvcd_imm_nz and rv_opcode_data.decomp_data as unused.
> 
> Signed-off-by: Richard Henderson <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

Alistair

> ---
>  disas/riscv.h | 5 -----
>  disas/riscv.c | 7 +------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/disas/riscv.h b/disas/riscv.h
> index 31bb0db86c..3909d73dd0 100644
> --- a/disas/riscv.h
> +++ b/disas/riscv.h
> @@ -186,7 +186,6 @@ typedef struct {
>      short decomp_rv32;
>      short decomp_rv64;
>      short decomp_rv128;
> -    short decomp_data;
>  } rv_opcode_data;
>  
>  typedef struct {
> @@ -217,10 +216,6 @@ enum {
>      rv_op_illegal = 0
>  };
>  
> -enum {
> -    rvcd_imm_nz = 0x1
> -};
> -
>  /* instruction formats */
>  
>  #define rv_fmt_none                   "O\t"
> diff --git a/disas/riscv.c b/disas/riscv.c
> index ddc2f73eae..95957506bd 100644
> --- a/disas/riscv.c
> +++ b/disas/riscv.c
> @@ -5417,12 +5417,7 @@ static const rv_opcode_data
> *decode_inst_decompress(rv_decode *dec, rv_isa isa,
>      }
>  
>      if (decomp_op != rv_op_illegal) {
> -        if ((op->decomp_data & rvcd_imm_nz) && dec->imm == 0) {
> -            dec->opcode_data = rvi_opcode_data;
> -            dec->op = rv_op_illegal;
> -        } else {
> -            dec->op = decomp_op;
> -        }
> +        dec->op = decomp_op;
>          op = &dec->opcode_data[decomp_op];
>      }
>      return op;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.