diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objtool/check.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 80e7b822a432..068cdb41f76f 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2084,6 +2084,20 @@ static int update_cfi_state(struct instruction *insn, struct cfi_state *cfi, } } + else if (op->dest.reg == CFI_SP && + cfi->vals[op->src.reg].base == CFI_SP_INDIRECT && + cfi->vals[op->src.reg].offset == cfa->offset) { + + /* + * The same stack swizzle case 2) as above. But + * because we can't change cfa->base, case 3) + * will become a regular POP. Pretend we're a + * PUSH so things don't go unbalanced. + */ + cfi->stack_size += 8; + } + + break; case OP_SRC_ADD: |