summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-07-13 17:09:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2020-07-22 10:46:09 -0700
commit034427a45a0f220d6a7e38bac4c70cfd60b07982 (patch)
treec94f645324040d32e839fb8f7ae9d53ca77e26b2 /src/plugins/platforms/windows/qwindowswindow.cpp
parent7284384eda22457adc1503c4f4d78f4f2772c45e (diff)
Deal with macOS not enabling AVX512 state in XCR0
All Mac Pros launched since 2019 have AVX512 support (CLX processor) but the Darwin kernel does not enable the state bits in the XCR0 register for all processes by default. Instead, it traps the #UD exception and decodes the instruction to find out if it was an AVX512 instruction. If so, it adds memory to the thread's context switch space. See [1]. Good solution, but forces us to have OS-specific code to determine if the OS really supports AVX512. No other OS appears to require this. For future features (namely, Intel Advanced Matrix Extensions), there's an official way of implementing this, via the eXtended Feature Disable register. Qt has no AVX512 code yet, so this is just being future-proof. Apple has yet to announce when or if their Mac Pros will switch from Intel Xeon to ARM. [1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174 Change-Id: Ieffc3453b88c4517a1dbfffd162175ead343e622 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
0 files changed, 0 insertions, 0 deletions