[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)
Shengchen Kan via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 01:03:05 PDT 2024
================
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
HasFullBFloat16 = true;
} else if (Feature == "+egpr") {
HasEGPR = true;
+ } else if (Feature == "+inline-asm-use-gpr32") {
----------------
KanRobert wrote:
> `mcmodel` maybe not a good reference here since it's target independent.
```
if (Opts.MicrosoftExt && getTriple().getArch() == llvm::Triple::x86) {
switch (SSELevel) {
case AVX512F:
case AVX2:
case AVX:
case SSE42:
case SSE41:
case SSSE3:
case SSE3:
case SSE2:
Builder.defineMacro("_M_IX86_FP", Twine(2));
break;
case SSE1:
Builder.defineMacro("_M_IX86_FP", Twine(1));
break;
default:
Builder.defineMacro("_M_IX86_FP", Twine(0));
break;
}
}
```
https://github.com/llvm/llvm-project/pull/92338
More information about the cfe-commits
mailing list