Re: [PATCH 34/56] disas/riscv: Tidy rv_comp_data terminators

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:
> Use { } instead of two zeros.
> 
> Signed-off-by: Richard Henderson <[email protected]>

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

Alistair

> ---
>  disas/riscv.c | 46 +++++++++++++++++++++++-----------------------
>  1 file changed, 23 insertions(+), 23 deletions(-)
> 
> diff --git a/disas/riscv.c b/disas/riscv.c
> index 9904b4db03..bb4779614b 100644
> --- a/disas/riscv.c
> +++ b/disas/riscv.c
> @@ -1072,123 +1072,123 @@ static const rvc_constraint rvcc_true[] = {
> rvc_end };
>  static const rv_comp_data rvcp_jal[] = {
>      { rv_op_j, rvcc_j },
>      { rv_op_jal_ra, rvcc_jal_ra },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_jalr[] = {
>      { rv_op_ret, rvcc_ret },
>      { rv_op_jr, rvcc_jr },
>      { rv_op_jalr_ra, rvcc_jalr_ra },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_beq[] = {
>      { rv_op_beqz, rvcc_beqz },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_bne[] = {
>      { rv_op_bnez, rvcc_bnez },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_blt[] = {
>      { rv_op_bltz, rvcc_bltz },
>      { rv_op_bgtz, rvcc_bgtz },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_bge[] = {
>      { rv_op_blez, rvcc_blez },
>      { rv_op_bgez, rvcc_bgez },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_addi[] = {
>      { rv_op_nop, rvcc_nop },
>      { rv_op_mv, rvcc_mv },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_sltiu[] = {
>      { rv_op_seqz, rvcc_seqz },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_xori[] = {
>      { rv_op_not, rvcc_not },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_sub[] = {
>      { rv_op_neg, rvcc_neg },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_slt[] = {
>      { rv_op_sltz, rvcc_sltz },
>      { rv_op_sgtz, rvcc_sgtz },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_sltu[] = {
>      { rv_op_snez, rvcc_snez },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_addiw[] = {
>      { rv_op_sext_w, rvcc_sext_w },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_subw[] = {
>      { rv_op_negw, rvcc_negw },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnj_s[] = {
>      { rv_op_fmv_s, rvcc_fmv_s },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjn_s[] = {
>      { rv_op_fneg_s, rvcc_fneg_s },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjx_s[] = {
>      { rv_op_fabs_s, rvcc_fabs_s },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnj_d[] = {
>      { rv_op_fmv_d, rvcc_fmv_d },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjn_d[] = {
>      { rv_op_fneg_d, rvcc_fneg_d },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjx_d[] = {
>      { rv_op_fabs_d, rvcc_fabs_d },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnj_q[] = {
>      { rv_op_fmv_q, rvcc_fmv_q },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjn_q[] = {
>      { rv_op_fneg_q, rvcc_fneg_q },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  static const rv_comp_data rvcp_fsgnjx_q[] = {
>      { rv_op_fabs_q, rvcc_fabs_q },
> -    { rv_op_illegal, NULL }
> +    { },
>  };
>  
>  /* Convert compressed insns into normal insns via pseudo expansion.
> */
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.