For x86-64, we diverge from GCC -fpatchable-function-entry in that we
emit multi-byte NOPs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: fail. 61247 tests passed, 1 failed and 736 were skipped.
failed: LLVM.CodeGen/X86/patchable-function-entry.ll
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
The GCC implementer did the work for Linux kernel AArch64. They probably did not think of x86 multi-byte NOP. Currently this feature is only used by the Linux kernel on arm64/parisc. I asked whether the x86 implementation should be improved https://gcc.gnu.org/ml/gcc/2020-01/msg00020.html
We don't support M!=0 (-fpatchable-function-entry=N,M). If we do, its interaction with -falign-functions=32 will be interesting. GCC apparently just simply aligns the first NOP, so the function symbol may be misaligned.
llvm/lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
1601 | is this longer than 80 columns? |
Unit tests: pass. 61250 tests passed, 0 failed and 736 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
llvm/lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
1604 | Sounds like this may be updated based on @ostannard 's comment in https://reviews.llvm.org/D72215#inline-653987. |
Unit tests: pass. 61276 tests passed, 0 failed and 736 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
llvm/lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
1607 | Can llvm::Attribute::getValueAsInt() be used here? |
Unit tests: pass. 61759 tests passed, 0 failed and 780 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
is this longer than 80 columns?