summaryrefslogtreecommitdiffstats
path: root/config.tests/x86_simd/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Correct license in config.testLucie Gérard2024-02-201-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all build system files should be BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I06880d91e4c6f8d7a92d249f3d216b2bc82fdeed Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: update the x86 intrinsic checksThiago Macieira2022-06-281-216/+0
| | | | | | | | | | | | | | | | | | | | | | | | Merge all the existing checks into a single one, which is a simple pass or fail, since all our supported compilers support all the intrinsics up to Cannon Lake. The two I've recently added (AVX512VBMI2 and VAES) aren't yet supported everywhere, so they stay. For some reason, all intrinsics seem to be disabled on Android. It looks like some support was missing during the CMake port and this was never again looked at. I'm leaving it be. As for WASM, discussion with maintainers is that the WASM emulation of x86 intrinsics is too hit-and-miss. No one is testing the performance, particularly the person writing such code (me). They also have some non-obvious selection of what is supported natively and what is merely emulated. Using the actual WASM intrinsics is preferred, but someone else's job. Change-Id: Ib42b3adc93bf4d43bd55fffd16c10d66208e8384 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: add detection of x86 VAES and AVX512VBMI2 featuresThiago Macieira2022-03-081-0/+20
| | | | | | | | We have VAES code in qhash.cpp that isn't getting compiled right now. Change-Id: Ibf4acec0f166495998f7fffd16d6961261dec361 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* qsimd_p.h: add a hack to allow AVX to work with MinGWThiago Macieira2022-01-201-3/+0
| | | | | | | | | | | | | | | | | | | GCC is unable to emit the SEH metadata about the stack aligning that is required to execute AVX aligned instructions (VMOVDQA, VMOVAPS, etc.), so it just doesn't align the stack. That causes crashes on a 50/50 chance every time the compiler attempts to address a stack-aligned variable. In a debug-mode build, because it always loads & saves everything on the stack, the chance of a crash happening is a near certainty. So we hack around it by going behind the compiler's back and instructing the assembler to emit the unaligned counterparts of the instructions every time the compiler wished to emit the aligned one. There's no performance penalty: if the variable is actually aligned, the unaligned instruction executes in the exact same time. Change-Id: Ib42b3adc93bf4d43bd55fffd16c29cac0da18972 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QRandom: add support for RDSEEDThiago Macieira2019-10-091-0/+17
| | | | | | | | | | | | | | | The Intel whitepaer[1] recommends using the RDSEED over RDRAND whenever present. libstdc++ from GCC 10 will also use it in std::random_device. [ChangeLog][QtCore][QRandomGenerator] The system() random generator will now use the RDSEED instruction on x86 processors whenever available as the first source of random data. It will fall back to RDRAND and then to the system functions, in that order. [1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide Change-Id: I907a43cd9a714da288a2fffd15bab176e54e1975 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* x86: Disable AVX support on 64-bit MinGWThiago Macieira2019-02-061-0/+3
| | | | | | | | | | | | | | | | | GCC for 64-bit Windows has a bug that it fails to properly re-align the stack pointer for use with 256-bit memory addresses (AVX). Therefore, there's about a 50/50 chance that any function using AVX will have an improperly-aligned stack. In release mode, stack accesses should be rare, but in debug mode they happen frequently. Either way, this is a ticking time bomb, so we disable. Clang is not affected. 32-bit MinGW is not affected. 64-bit in other OSes with GCC are not affected. Fixes: QTBUG-73539 Change-Id: Id061f35c088044b69a15fffd1580967808f31671 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Centralize the x86 SIMD testing in one placeThiago Macieira2017-11-301-1/+1
| | | | | | | | Since the x86_simd/main.cpp file already has all the source for each and every test anyway, just reuse it. Change-Id: I938b024e38bf4aac9154fffd14f779f450827fb9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add a configure-time check for QT_COMPILER_SUPPORTS_SIMD_ALWAYSThiago Macieira2017-11-301-0/+253
This has two main benefits: 1) introduces a qmake CONFIG we can use in .pro/.pri/.prf files 2) removes the need to keep an up-to-date list of which compilers support the feature The test is implemented as trying to compile every single SIMD test we currently have, but without passing the -mXXX option. The reason for trying all of them is that some people may have modified their mkspecs to add -mXXX options or -march=XXX, which could enable the particular feature we tried, resulting in a false positive outcome. Change-Id: I938b024e38bf4aac9154fffd14f7784dc8d1f020 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>