Commit 62200ff
committed
Add cpuid checks for XSAVE, OSXSAVE and AVX
AVX2 and AVX512F depend on AVX, XSAVE and OSXSAVE being present.
If they are not, AVX2/AVX512F instructions may be blocked even
though cpuid() reports them to be available. Spotted when the
AVX512 rANS codec crashed with illegal instructions on a virtual
host that claimed to have AVX512F, but did not have OSXSAVE.1 parent de42211 commit 62200ff
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
865 | 867 | | |
866 | 868 | | |
867 | 869 | | |
| |||
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
880 | 888 | | |
881 | 889 | | |
882 | | - | |
| 890 | + | |
| 891 | + | |
883 | 892 | | |
884 | 893 | | |
885 | 894 | | |
| |||
0 commit comments