From: Richard Henderson <[email protected]>
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]>
Message-ID: <[email protected]>
Signed-off-by: Alistair Francis <[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.54.0
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.