diff options
author | Fangrui Song <i@maskray.me> | 2025-03-16 16:18:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-16 16:18:14 -0700 |
commit | 81ba006296680c9d62aba12c5e3f083e2f7c595d (patch) | |
tree | a423932f9348e356acb98ef044c79a2f9820010a /llvm/lib/CodeGen/CodeGen.cpp | |
parent | 91328dbae986dfa93cf2acef0a93361fd5ced66d (diff) | |
download | llvm-81ba006296680c9d62aba12c5e3f083e2f7c595d.zip llvm-81ba006296680c9d62aba12c5e3f083e2f7c595d.tar.gz llvm-81ba006296680c9d62aba12c5e3f083e2f7c595d.tar.bz2 |
[X86] nocf_check: disable tail call
When a function pointer is annotated with
`void (*fptr)(void) __attribute__((nocf_check));`, calling it should use
the NOTRACK prefix, as the callee may not contain an ENDBR.
https://reviews.llvm.org/D41879 implemented NOTRACK variants for
X86ISD::CALL and ISD::BRIND but not for TCRETURN. Given that there are
so many tail call variants (e.g. conditional tailcall
https://reviews.llvm.org/D29856), let's just disable tailcall.
While nocf_check has some uses within the Linux kernel, it isn't a
popular attribute.
Fix #91228
Pull Request: https://github.com/llvm/llvm-project/pull/131487
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions