objtool: Support stack-swizzle
authorPeter Zijlstra <peterz@infradead.org>
Wed, 3 Feb 2021 11:02:17 +0000 (12:02 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 10 Feb 2021 19:53:52 +0000 (20:53 +0100)
commitaafeb14e9da29e323b0605f8f1bae0d45d5f3acf
tree3249ef70672aef580a3535ac7b485a791672307b
parent2a512829840eb97a8b52eca7058e56d484468f2d
objtool: Support stack-swizzle

Natively support the stack swizzle pattern:

mov %rsp, (%[tos])
mov %[tos], %rsp
...
pop %rsp

It uses the vals[] array to link the first two stack-ops, and detect
the SP to SP_INDIRECT swizzle.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
tools/objtool/check.c