[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 23:26:54 PDT 2022


craig.topper added a comment.

In D131134#3715062 <https://reviews.llvm.org/D131134#3715062>, @pengfei wrote:

> In D131134#3715024 <https://reviews.llvm.org/D131134#3715024>, @pengfei wrote:
>
>> In D131134#3714860 <https://reviews.llvm.org/D131134#3714860>, @craig.topper wrote:
>>
>>> Yes AMX is only supported in 64-bit mode but I doubt CPUID checks which mode the program is running in.
>>
>> I guess `HasAMXSave` is `false` on 32-bit mode https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/Host.cpp#L1800. But I don't have the environment to check it.
>
> I found it. The `XFEATURE_MASK_XTILE` in Kernel is the same as `HasAMXSave` in compiler: https://lwn.net/ml/linux-kernel/20210710130313.5072-20-chang.seok.bae@intel.com/
> So these features bits are `true` only on 64-bit mode.

Is it cleared when running a 32-bit binary on a 64-bit kernel?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131134/new/

https://reviews.llvm.org/D131134



More information about the cfe-commits mailing list