Skip to content

Commit 60041bc

Browse files
author
Peter Zijlstra
committed
objtool: Make handle_insn_ops() unconditional
Now that every instruction has a list of stack_ops; we can trivially distinquish those instructions that do not have stack_ops, their list is empty. This means we can now call handle_insn_ops() unconditionally. Suggested-by: Julien Thierry <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 7d989fc commit 60041bc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tools/objtool/check.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
22592259
return 0;
22602260
}
22612261

2262+
if (handle_insn_ops(insn, &state))
2263+
return 1;
2264+
22622265
switch (insn->type) {
22632266

22642267
case INSN_RETURN:
@@ -2318,9 +2321,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
23182321
break;
23192322

23202323
case INSN_EXCEPTION_RETURN:
2321-
if (handle_insn_ops(insn, &state))
2322-
return 1;
2323-
23242324
/*
23252325
* This handles x86's sync_core() case, where we use an
23262326
* IRET to self. All 'normal' IRET instructions are in
@@ -2340,8 +2340,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
23402340
return 0;
23412341

23422342
case INSN_STACK:
2343-
if (handle_insn_ops(insn, &state))
2344-
return 1;
23452343
break;
23462344

23472345
case INSN_STAC:

0 commit comments

Comments
 (0)