Allow pseudo expansion to proceed in multiple steps. Assert that we don't have simple loops.
Reviewed-by: Alistair Francis <[email protected]> Signed-off-by: Richard Henderson <[email protected]> --- 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++; } -- 2.43.0
