objtool: Support multiple stack_op per instruction

Instruction sets can include more or less complex operations which might
not fit the currently defined set of stack_ops.

Combining more than one stack_op provides more flexibility to describe
the behaviour of an instruction. This also reduces the need to define
new stack_ops specific to a single instruction set.

Allow instruction decoders to generate multiple stack_op per
instruction.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200327152847.15294-11-jthierry@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Julien Thierry
2020-03-27 15:28:47 +00:00
committed by Ingo Molnar
parent 1ee444700e
commit 65ea47dcf4
4 changed files with 62 additions and 31 deletions

View File

@@ -42,7 +42,7 @@ struct instruction {
struct rela *jump_table;
struct list_head alts;
struct symbol *func;
struct stack_op stack_op;
struct list_head stack_ops;
struct insn_state state;
struct orc_entry orc;
};