[X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk
authorPhoebe Wang <phoebe.wang@intel.com>
Fri, 29 Jul 2022 09:47:49 +0000 (17:47 +0800)
committerPhoebe Wang <phoebe.wang@intel.com>
Thu, 4 Aug 2022 07:12:15 +0000 (15:12 +0800)
commit6f867f9102838ebe314c1f3661fdf95700386e5a
treebac314c0cb8908721e4cc20cb62f636f468586c8
parent45bae1be90472c696f6ba3bb4f8fabee76040fa9
[X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk

This is to address feature request from https://github.com/ClangBuiltLinux/linux/issues/1665

Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D130754
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGen/X86/indirect-branch-cs-prefix.c [new file with mode: 0644]
clang/test/Driver/x86_features.c
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/lib/Target/X86/X86ReturnThunks.cpp
llvm/test/CodeGen/X86/attr-function-return.ll
llvm/test/CodeGen/X86/lvi-hardening-indirectbr.ll