diff options
author | Wunkolo <[email protected]> | 2023-03-22 12:54:30 -0700 |
---|---|---|
committer | Wunkolo <[email protected]> | 2023-03-22 17:40:34 -0700 |
commit | d700f6c3573e0a2fda1511c36b60e86245278735 (patch) | |
tree | 5b20886455e0529ca322697d54018d419545bc19 /sample | |
parent | 740dff2e866f3ae1a70dd42d6e8836847ed95cc2 (diff) | |
download | xbyak-d700f6c3573e0a2fda1511c36b60e86245278735.tar.gz xbyak-d700f6c3573e0a2fda1511c36b60e86245278735.zip |
add detection of xsave
The XSAVE cpuid flag determines if the processor supports the XSAVE
instructions(`xsave`, `xrestor`, `xsetbv`, `xgetbv`).
The OSXSAVE cpuid flag determines if the _operating system_ has XSAVE
**enabled**. Userland code has to use OSXSAVE for features such as AVX
and AVX512 but it still matters to know if the processor itself supports
it but not the operating system such as some virtual-machine contexts.
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test_util.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/test_util.cpp b/sample/test_util.cpp index 4a8dbc7..3405905 100644 --- a/sample/test_util.cpp +++ b/sample/test_util.cpp @@ -36,7 +36,8 @@ void putCPUinfo(bool onlyCpuidFeature) { Cpu::tE3DN, "e3dn" }, { Cpu::tAESNI, "aesni" }, { Cpu::tRDTSCP, "rdtscp" }, - { Cpu::tOSXSAVE, "osxsave(xgetvb)" }, + { Cpu::tXSAVE, "xsave(xgetvb)" }, + { Cpu::tOSXSAVE, "osxsave" }, { Cpu::tPCLMULQDQ, "pclmulqdq" }, { Cpu::tAVX, "avx" }, { Cpu::tFMA, "fma" }, |