summaryrefslogtreecommitdiffstats
path: root/tools/objtool/arch.h
diff options
context:
space:
mode:
authorJulien Thierry <jthierry@redhat.com>2020-03-27 15:28:47 +0000
committerIngo Molnar <mingo@kernel.org>2020-04-22 10:53:50 +0200
commit65ea47dcf4f936987a5fbf839c97acea00f4f196 (patch)
treebc960fe0d080dea37cb653326acaa47051ebdeba /tools/objtool/arch.h
parent1ee444700e960b017558038a9443474e808b0045 (diff)
downloadlinux-65ea47dcf4f936987a5fbf839c97acea00f4f196.tar.gz
linux-65ea47dcf4f936987a5fbf839c97acea00f4f196.tar.bz2
linux-65ea47dcf4f936987a5fbf839c97acea00f4f196.zip
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>
Diffstat (limited to 'tools/objtool/arch.h')
-rw-r--r--tools/objtool/arch.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/arch.h b/tools/objtool/arch.h
index a9a50a25ca66..f9883c431949 100644
--- a/tools/objtool/arch.h
+++ b/tools/objtool/arch.h
@@ -64,6 +64,7 @@ struct op_src {
struct stack_op {
struct op_dest dest;
struct op_src src;
+ struct list_head list;
};
struct instruction;
@@ -73,7 +74,8 @@ void arch_initial_func_cfi_state(struct cfi_state *state);
int arch_decode_instruction(struct elf *elf, struct section *sec,
unsigned long offset, unsigned int maxlen,
unsigned int *len, enum insn_type *type,
- unsigned long *immediate, struct stack_op *op);
+ unsigned long *immediate,
+ struct list_head *ops_list);
bool arch_callee_saved_reg(unsigned char reg);