summaryrefslogtreecommitdiffstats
path: root/tools/objtool/arch/x86/decode.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-02-09 21:41:13 +0100
committerIngo Molnar <mingo@kernel.org>2021-03-06 12:44:23 +0100
commitffc7e74f36a2c7424da262a32a0bbe59669677ef (patch)
tree40cd183b2b1229387de2e1c5f0fd7ea1961a57df /tools/objtool/arch/x86/decode.c
parent2ee0c363492f1acc1082125218e6a80c0d7d502b (diff)
downloadlinux-ffc7e74f36a2c7424da262a32a0bbe59669677ef.tar.gz
linux-ffc7e74f36a2c7424da262a32a0bbe59669677ef.tar.bz2
linux-ffc7e74f36a2c7424da262a32a0bbe59669677ef.zip
objtool,x86: Rewrite LEAVE
Since we can now have multiple stack-ops per instruction, we don't need to special case LEAVE and can simply emit the composite operations. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lkml.kernel.org/r/20210211173627.253273977@infradead.org
Diffstat (limited to 'tools/objtool/arch/x86/decode.c')
-rw-r--r--tools/objtool/arch/x86/decode.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index d8f01387d671..47b9acfc6a4c 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -446,9 +446,17 @@ int arch_decode_instruction(const struct elf *elf, const struct section *sec,
* mov bp, sp
* pop bp
*/
- ADD_OP(op)
- op->dest.type = OP_DEST_LEAVE;
-
+ ADD_OP(op) {
+ op->src.type = OP_SRC_REG;
+ op->src.reg = CFI_BP;
+ op->dest.type = OP_DEST_REG;
+ op->dest.reg = CFI_SP;
+ }
+ ADD_OP(op) {
+ op->src.type = OP_SRC_POP;
+ op->dest.type = OP_DEST_REG;
+ op->dest.reg = CFI_BP;
+ }
break;
case 0xe3: