From 6c3befdd7017bfec7034a03e931913200fa1fc51 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Mon, 17 May 2021 21:50:55 +0200 Subject: [PATCH] freedreno/isa: add next_instruction(..) In during the next commits we will change to a generated version of next_instruction(..) based on the actual isa. Signed-off-by: Christian Gmeiner Reviewed-by: Rob Clark Part-of: --- src/freedreno/isa/decode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/freedreno/isa/decode.c b/src/freedreno/isa/decode.c index 05d5d5b26cb..4719301f10f 100644 --- a/src/freedreno/isa/decode.c +++ b/src/freedreno/isa/decode.c @@ -613,6 +613,12 @@ display(struct decode_scope *scope) } } +static inline void +next_instruction(bitmask_t *instr, uint64_t *start) +{ + *instr = *start; +} + static void decode(struct decode_state *state, void *bin, int sz) { @@ -620,7 +626,9 @@ decode(struct decode_state *state, void *bin, int sz) unsigned errors = 0; /* number of consecutive unmatched instructions */ for (state->n = 0; state->n < state->num_instr; state->n++) { - uint64_t instr = instrs[state->n]; + bitmask_t instr = { 0 }; + + next_instruction(&instr, &instrs[state->n]); if (state->options->max_errors && (errors > state->options->max_errors)) { break;