aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 92b6a2c21631..5409f6f6c48d 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1386,6 +1386,17 @@ static int update_insn_state(struct instruction *insn, struct insn_state *state)
1386 state->vals[op->dest.reg].offset = -state->stack_size; 1386 state->vals[op->dest.reg].offset = -state->stack_size;
1387 } 1387 }
1388 1388
1389 else if (op->src.reg == CFI_BP && op->dest.reg == CFI_SP &&
1390 cfa->base == CFI_BP) {
1391
1392 /*
1393 * mov %rbp, %rsp
1394 *
1395 * Restore the original stack pointer (Clang).
1396 */
1397 state->stack_size = -state->regs[CFI_BP].offset;
1398 }
1399
1389 else if (op->dest.reg == cfa->base) { 1400 else if (op->dest.reg == cfa->base) {
1390 1401
1391 /* mov %reg, %rsp */ 1402 /* mov %reg, %rsp */