summaryrefslogtreecommitdiffstats
path: root/config.tests/arch/arch.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>
* Remove the mandatory x86-64 features from its feature listThiago Macieira2023-05-311-3/+3
| | | | | | | | | | | | | | The x86-64 architecture mandates support for MMX and SSE2, so we don't need to tell that the compiler generates them. They're implied. This could serve to determine that the user specified no -march= or -m flags that affect the architecture on the CMAKE_CXX_FLAGS, but fails if the compiler does that on its own for this particular target. For example, both for Android and macOS, the minimum feature set is SSSE3 for 32-bit and SSE4.1 for 64-bit. Change-Id: I76216ced393445a4ae2dfffd172a94b17e8a9a37 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | 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>
* Add runtime ARM64 AES checkAllan Sandfeld Jensen2021-05-201-0/+3
| | | | | | | | | | | | Adds runtime CPU detection for Windows and macOS, and switches feature detection of AES to runtime like for x86, So far only on ARM64, since gcc doesn't do function versioning on ARM32, but clang can, so it could be added later. Change-Id: Ibe5d60f48cdae3e366a8ecd6263534ba2b09b131 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SIMD: Remove unused (and unlikely to be ever used) AVX-512 profilesThiago Macieira2018-06-251-5/+5
| | | | | | | | | | | | | "AVX512MIC" (Many Integrated Cores) is the set of AVX-512 features found on the Intel Xeon Phi coprocessors (codename "Knights Landing"), which is an unlikely architecture for Qt to run on. The two profiles with VL came from study of early GCC code and are no longer applicable. GCC source code now shows both VBMI and IFMA as part of the -march=cannonlake feature set. Change-Id: Iff4151c519c144d580c4fffd153a0f268919fe2c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qsimd: add support for new x86 CPU featuresThiago Macieira2018-05-051-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | This adds detection for: VAES, GFNI, AVX512VBMI2, AVX512VNNI, AVX512BITALG, AVX512VPOPCNTDQ, AVX512_4NNIW, AVX512_4FMAPS. These features were found in the "Intel® Architecture Instruction Set Extensions and Future Features" manual, revision 30. This commit also adds support for RDPID (already in the main manual) and the Control-flow Enforcement Technology, which appears in a separate Intel paper. This new support was done by adding a new generator script so we don't have to maintain two tables in sync, one in qsimd.cpp with the feature names, and the other in qsimd_p.h. Since we now need a lot more bits, it's no longer worth keeping the two halves of the qt_cpu_features variable mostly similar to the main two CPUID results. This commit goes back to keeping things in order, like we used to prior to commit 6a8251a89b6a61258498f4af1ba7b3d5b7f7096c (Qt 5.6) At the time of this commit, GCC 8 has macros for AVX512VPOPCNTDQ, AVX512_4NNIW, AVX512_4FMAPS, AVX512VBMI2 and GFNI. Change-Id: I938b024e38bf4aac9154fffd14f7afae50faaa96 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make build ABI available as qmake variableSimon Hausmann2017-03-281-0/+4
| | | | | | | | | | This is needed to encode the correct ABI into the generated qml caches. It is identical with the return value of QSysInfo::buildAbi(). Change-Id: I2d581b22326da4220f412ab4f517156f4ba31897 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* PowerPC: Add detection of SPE (found on e500) and VSXThiago Macieira2016-06-191-0/+6
| | | | | | | | | Poky (Yocto's reference distro) has a special build for the e500v2, so I'm guessing this ABI is somewhat important. Change-Id: I14839ba5678944c2864bffff14176c4d61b8799f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the Intel copyright yearThiago Macieira2016-01-211-1/+1
| | | | | | | | | Not that we require it, but since The Qt Company did it for all files they have copyright, even if they haven't touched the file in years (especially not in 2016), I'm doing the same. Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* ARMv8: add crc32 feature detection.Erik Verbruggen2016-01-131-0/+3
| | | | | Change-Id: I3cfac90dfa137d0bf3d124d87262eb2dbb56459c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Detect NEON on AArch64Allan Sandfeld Jensen2015-11-261-1/+1
| | | | | | | | | | | | The __ARM_NEON is the standard define for NEON instructions support __ARM_NEON__ is only legacy, and specifically not defined in AArch64 builds, which causes us not to detect NEON support there. The NEON assembler files doesn't build with AArch64, so the NEON drawhelper methods must be excluded for now. Change-Id: Ie32f855bde94ee7efd8a8ddb7766c931778e729b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the list of x86 instruction set extensions enabled by GCCThiago Macieira2015-07-281-5/+37
| | | | | | | | From GCC 6's gcc/config/i386.c and i386-c.c Change-Id: Ib306f8f647014b399b87ffff13f1d8a8cfbfa591 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add the detection of the compiler macros for more AVX512 featuresThiago Macieira2014-07-311-0/+12
| | | | | Change-Id: I1d1f2c3857824b17185bc47398299ea7f92c5568 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove the ARCH_FULL output from config.tests/archThiago Macieira2014-06-171-4/+0
| | | | | | | | | | The next commit will add something to ARCH_FULL that requires qconfig.h. That means we can't extract the full info until qconfig.h is created, which hasn't happened yet at the time that config.tests/arch is compiled. Change-Id: Icbbd8c448423a93296a986ede3771e82e4d61e07 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add QSysInfo::cpuArchitecture() and fullCpuArchitecture()Thiago Macieira2014-05-091-30/+5
| | | | | | | | | | | | This uses the same logic as the config.test, so we will return the same string as the $$QT_ARCH variable in qmake for cpuArchitecture(). fullCpuArchitecture() is meant to be used in upgrade mechanisms, when combined with the OS type. Change-Id: If0dfee9eff75a07fa4c0778d204e0e768bf43074 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add x86 arch detection support for AVX512 and SHA instructionsThiago Macieira2013-08-221-0/+20
| | | | | | | | | | The flags come from GCC commit 201219: http://gcc.gnu.org/viewcvs/gcc/branches/avx512/gcc/config/i386/i386-c.c?limit_changes=0&r1=201219&r2=201218&pathrev=201219 Clang and ICC don't seem to have support for this yet. Change-Id: Ic941654a5c56ed110d0e754e436a92dc5deaeb17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Replace the Intel Haswell and Ivy Bridge codenames with actual namesThiago Macieira2013-08-081-8/+8
| | | | | | Change-Id: I2a31e96d324dd704e6f96b35ec68c79fd64a090e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* mips: Autodetect MIPS DSP rev1 and rev2 instructionsetHolger Hans Peter Freyther2012-09-011-1/+6
| | | | | | | | | | Not every MIPS SoC has the DSP extensions, auto-detect them by using builtin GCC functions. Check for the DSP macros and add the result for rev1 and rev2 to the cpufeatures. Change-Id: I3d6c950f170f102514c43b349f9a23ee796d801a Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update listing of when SSSE3 and SSE4.1 first became availableThiago Macieira2012-06-121-2/+2
| | | | | | | | | SSSE3 was first available on the original Intel Core 2 processors, so add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of those processors, codename "Penryn", not on the next architecture. Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Record the sub-architecture (CPU features enabled in the compiler)Thiago Macieira2012-05-301-0/+162
| | | | | | | | | | | | | If the system's compiler has extra features on top of the base settings enabled or if the mkspec or $CXXFLAGS variable included some, record them. This will allow us to choose whether or not to use our own special compilers, based on whether the system default compiler contains it or not. Change-Id: I87cada9fab4cfa58846a831d0a7c7b50d8fa87fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Improve the architecture-detection mechanismThiago Macieira2012-05-301-27/+25
| | | | | | | | | | | | | | For the Unix part, this now obeys the -v option, printing the full command-line it used to compile, allowing testers to identify why something went wrong. Unfortunately, it requires a full compilation cycle, instead of just preprocessing. Just one more among the many on Unix, but maybe a noticeable slow-down on Windows. Change-Id: I654b70d99887e04c96731a5b91be9ad555e4d8fe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Ensure that qXXXdetection.h can be included directlyThiago Macieira2012-04-211-0/+1
| | | | | | | | | Those files might have dependency on one another, on qconfig.h and on early qglobal.h definitions, so ensure that the only correct include order is that of qglobal.h. Change-Id: I89098bacaf16353ee8b51604ee885508dc8e201a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make architecture detection more robust.Girish Ramakrishnan2012-03-221-13/+13
| | | | | | | | | Any message/error in mkspecs or qmake feature files ends up confusing the current arch detection logic. Instead, search for "Project MESSAGE: .* Architecture: <arch>". Change-Id: I308932a5b75f3a1fcbc4fe30c74faf2e83b2d752 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* arch: Undefine possible architecture definesHolger Hans Peter Freyther2012-03-161-0/+13
| | | | | | | | | | | | | Some compilers define the architecture to one leading to detecting '1' as target architecture. Always undef the architecture name. Compilers: gcc version 4.6.3 (Debian 4.6.3-1) has '#define i386 1' gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) has '#define mips 1' Change-Id: I7af1bb743579be472467c74e6c08638648823ef3 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove -arch argument and #define QT_ARCH from configuresBradley T. Hughes2012-03-131-0/+70
Do not try to detect the host or target architectures using uname or similar, and do not override with the -arch or -host-arch configure arguments. The configures will still accept the -arch and -host-arch arguments, but it ignores them and instead outputs a warning stating that these arguments are obsolete and should not be used. Set QT_ARCH and QT_HOST_ARCH qconfig.pri variables based on the compiler target. This is done by running qmake (twice when cross-compiling) on config.tests/arch/arch.pro, which preprocesses a file that contains all knowns processors. On Windows, configure.exe has never run any config.tests before, and does not currently have a function to run a program and capture its output. Use _popen() to accomplish this (as qmake does for its system() function). This needs to be done after qmake is built, as does the mkspecs/qconfig.pri generation. As a side effect, the configure steps have been slightly re-ordered, but the overall result is the same. The displayConfig() call is moved to just before generating Makefiles, so that it can show the detected architecture(s). Change-Id: I77666c77a93b48848f87648d08e79a42f721683f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>