[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)
Shengchen Kan via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 19:04:38 PDT 2024
================
@@ -248,6 +248,10 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple,
Features.push_back(Args.MakeArgString((IsNegative ? "-" : "+") + Name));
}
+ llvm::StringSet<> SubFeaturesOfAPX = {"egpr", "push2pop2", "ppx", "ndd",
+ "ccmp", "nf", "cf", "zu"};
+ llvm::StringSet<> FeaturesIn64BitOnly = {"uintr"};
----------------
KanRobert wrote:
https://github.com/llvm/llvm-project/pull/101151#issue-2437258242
It's to align with GCC. Compiler won't generate these instructions for `usermsr` and `cmpccxadd` except intrinsic.
For intrinsic, it's not visible in 32-bit mode b/c the macro like `__x86_64` is not defined.
https://github.com/llvm/llvm-project/pull/101151
More information about the cfe-commits
mailing list