Skip to content

RFC x86/asm: Improve code generation

Josh Poimboeuf lkml 1 version Applied

Status from this message: The following commit has been merged into the objtool/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 13 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5objtool: Remove ANNOTATE_IGNORE_ALTERNATIVE from CLAC/STACarch/x86/include/asm/smap.h tools/objtool/check.c+35 -71 reply
2/5objtool, x86/hweight: Remove ANNOTATE_IGNORE_ALTERNATIVEarch/x86/include/asm/arch_hweight.h+2 -40 replies
3/5noinstr: Use asm_inline() in instrumentation_{begin,end}()include/linux/instrumentation.h+2 -23 replies
4/5x86/alternative: Improve code generation readabilityarch/x86/include/asm/alternative.h+63 -258 replies
5/5objtool: Improve code generation readabilityinclude/linux/objtool.h+47 -501 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/5] x86/asm: Improve code generation

Some various improvements for inline asm code generation.

The "RFC" is really patches 4 and 5, they propose a more readable format for alternatives and objtool annotations. Bikeshedding welcome.

If a general format is agreed upon, we could do similar for other annotations like WARN/BUG, static branches/calls, etc.

Josh Poimboeuf (5):
objtool: Remove ANNOTATE_IGNORE_ALTERNATIVE from CLAC/STAC objtool, x86/hweight: Remove ANNOTATE_IGNORE_ALTERNATIVE
noinstr: Use asm_inline() in instrumentation_{begin,end}() x86/alternative: Improve code generation readability
objtool: Improve code generation readability

 arch/x86/include/asm/alternative.h  | 88 ++++++++++++++++++--------
 arch/x86/include/asm/arch_hweight.h |  6 +-
 arch/x86/include/asm/smap.h         | 12 ++--
 include/linux/instrumentation.h     |  4 +-
 include/linux/objtool.h             | 97 ++++++++++++++---------------
 tools/objtool/check.c               | 30 ++++++++-
 6 files changed, 149 insertions(+), 88 deletions(-)
Signature · 1 line
2.49.0