On Sun, 2026-08-09 at 15:35 -0700, Richard Henderson wrote:
> Allow pseudo expansion to proceed in multiple steps.
> Assert that we don't have simple loops.
> 
> Signed-off-by: Richard Henderson <[email protected]>

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

Alistair

> ---
>  disas/riscv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/disas/riscv.c b/disas/riscv.c
> index fe503b6cae..b8e5b124a5 100644
> --- a/disas/riscv.c
> +++ b/disas/riscv.c
> @@ -5259,9 +5259,9 @@ static const rv_opcode_data
> *decode_inst_lift_pseudo(rv_decode *dec,
>      if (comp_data) {
>          while (comp_data->constraints) {
>              if (check_constraints(dec, comp_data->constraints)) {
> -                dec->op = comp_data->op;
> -                op = &dec->opcode_data[dec->op];
> -                break;
> +                const rv_opcode_data *new_op = &dec-
> >opcode_data[comp_data->op];
> +                assert(new_op != op);
> +                return decode_inst_lift_pseudo(dec, new_op);
>              }
>              comp_data++;
>          }

Reply via email to