summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qsimd.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Deal with macOS not enabling AVX512 state in XCR0Thiago Macieira2020-07-221-18/+50
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix build of rdrand & rdseed with ICC on LinuxThiago Macieira2020-05-061-8/+20
| | | | | | | | | qsimd.cpp(636): error: argument of type "qregisteruint={quint64={unsigned long long}} *" is incompatible with parameter of type "unsigned long *" Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160c4785c98adc4d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move qsimd* from corelib/tools to corelib/globalLars Knoll2020-03-261-0/+718
It's not used in tools at all and fits a lot better in global. Also fix the qsimd_x86* files to have a proper copyright header. Change-Id: Id3d8e7cfcd7769a1ca9f3d8cf6d357a31a99ba40 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>