summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qprocessordetection.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Use __aarch64__ instead of __arm64__ to detect AArch64Tor Arne Vestbø2014-11-041-2/+2
| | | | | | | | | | The latter name was used by Apple in their internal AArch64 LLVM backend, but has since been merged into LLVM upstream and renamed to AArch64. https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68 Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Fix x86/32-bit build when using an old version of gccJulien Brianceau2014-08-141-0/+1
| | | | | | | Versions prior to 4.3 don't define __SIZEOF_POINTER__ macro. Change-Id: I3144329778acd276e2fb885cb197a4532a15da70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable sparc detection.Lisandro Damián Nicanor Pérez Meyer2014-06-271-6/+9
| | | | | | | | It has been working in Debian for some time. It also adds detection for 64bits Sparc. Change-Id: Ie4fc0f58b37672b79191ebe51de0caf2eaf8a1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable s390[x] detection.Lisandro Damián Nicanor Pérez Meyer2014-04-031-6/+6
| | | | | | | It has been working in Debian for some time. Change-Id: Ib5741a4ba68bf95c7020336c84bc66257ff27809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Export optimized premultiply and unpremultiply methodsAllan Sandfeld Jensen2014-02-101-3/+2
| | | | | | | | | | | | | | | | This patch optimizes the unpremultiply method further by using a lookup table to avoid any divisions at all. The opportunity is taken to export both premultiply and unpremultiply since they are commonly used methods relevant to the exported QRgb type that can be both premultiplied and unpremultipled ARGB. [ChangeLog][QtGui][QColor] Exported highly optimized methods for premultiply and unpremultiply of QRgb values. Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Declare qregister[u]int, an integer the size of the machine's wordThiago Macieira2014-01-301-0/+21
| | | | | | | | | | | | | | | In almost all platforms, sizeof(qregisterint) == sizeof(void*) == sizeof(qptrdiff). It's different for architectures that have a pointer with a size different from the machine word. This allows us to declare variables of the most optimal size, even if the pointers are too wide or too narrow. The only currently-known architectures to match that case are the ILP32 builds on x86-64 (a.k.a "x32") and IA-64 (option -milp32, only available on HP-UXi), which have 64-bit registers but 32-bit pointers. Change-Id: I0f126b70ea9ea326bd3143797287e4b98210d36d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* WinRT: Basic global supportAndrew Knight2013-09-201-1/+1
| | | | | | | | Various global changes, primarily preprocessor flow, to support the WinRT platform. Change-Id: I3fa9cf91d5fb24019362e88fcf205e31b4f810b5 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Add support for ARMv8/ARM64 to qprocessordetection.hTor Arne Vestbø2013-09-161-3/+13
| | | | | | | As used by the upcoming iPhone 5S' A7 SoC. Change-Id: I276dc739c2565bce23fb1a12c9470dcd311e67ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Define Q_PROCESSOR_X86 to the x86 familyThiago Macieira2013-08-221-2/+24
| | | | | | | | | | | | | | | They are: 3 Intel 80386 or equivalent 4 Intel 80486 or equivalent 5 Intel Pentium, Pentium MMX, AMD K6 and a few others 6 everything since the Intel Pentium Pro and AMD Athlon By necessity, this means all 64-bit builds have a family of 6. That matches the family number that the CPUID instruction produces. Change-Id: I5dc7344976f8da65938f44310b89ade4fe3f1a28 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qprocessordetection: add armv7sRichard Moe Gustavsen2013-04-191-0/+2
| | | | | | | | | | | | | | | | | | Xcode builds projects for armv7s if a compatible device is set as target device. If trying to include <QtCore/QtCore> into such projects, the build fails complaining about "the usage of sizeof missing QMutexData definition in qgenericatomic.h" The reason is that qprocessdetection.h fails to pick up that we're building for ARM, and includes qatomic_gcc.h instead of qatomic_armv7.h. So we need to check for __ARM_ARCH_7S__ as well. In addition, iPhoneOS6.1.sdk/usr/include/arm/arch.h will define _ARM_ARCH_7 if any of the more specic ARM defines are defined, so I add this check as well to more easy support new version of ARM7. Change-Id: Ic51a4d7ac99f7f6ba1065f870b3ef82d1250b56c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add predefined macros for endian detection with the TI toolchainsLaszlo Papp2013-03-181-2/+2
| | | | | Change-Id: I88768adc8acb3b28b7a774f2e9a285d983c9d76d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add __ARM_ARCH_5TE__ to Q_PROCESSOR_ARM_V5BogDan Vatra2013-03-021-0/+1
| | | | | | | | Android uses this define for armv5. Change-Id: Iee32f3e8691fa731ab0c2185a01620e18741f9a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* 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>
* Fix processor detection for MSVC ARM compiler (WEC7).Janne Anttila2012-08-201-4/+7
| | | | | | | | | | | | | Visual Studio compiler defines _M_ARM preprocessor variable when compiling for ARM and the value of preprocessor variable indicates the supported instruction set. For more information see: http://msdn.microsoft.com/en-us/library/gg155713.aspx Change-Id: I54137257b83f64fdf03bf7df9995e08d16dff4df Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix endian detection for winceAndreas Holzammer2012-06-041-1/+1
| | | | | | | | | | | As the qsystemdetection.h is not included so Q_OS_WINCE is not defined here, so use the define from the mkspec. Change-Id: Ic170725d0da89f0c0e675c62bd2aa5c58803de9f Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Ensure that qXXXdetection.h can be included directlyThiago Macieira2012-04-211-0/+4
| | | | | | | | | 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>
* Remove -arch argument and #define QT_ARCH from configuresBradley T. Hughes2012-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* byteorder: Fix compilation for MIPS and GCC < 4.6.Holger Hans Peter Freyther2012-03-101-0/+6
| | | | | | | | | Use the pre-processor macros to detect the byte order. This is how it is done for ARM and other platforms. Use the variant of the macro with the most underscores to match our ARM detection. Change-Id: I7d2b34bf45a7f3979b44a1fe2e95f678152a5dcd Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* byteorder: Improve the implementation comments for auto-detectHolger Hans Peter Freyther2012-03-091-6/+14
| | | | | | | | | | Parts of the auto-detection is using __BYTE_ORDER__. This pre-processor macro was added in GCC 4.6. Document that in the auto-detection code. Remove the misleading error message in qsysinfo.h. Change-Id: I66430ba1c9a1cdf476889ae6d5f3ca476243e000 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* misc: Fix some random typos and grammar while reading code.Holger Hans Peter Freyther2012-03-091-1/+1
| | | | | | | | | | | | Typos: recieve -> receive descrived -> describe Grammar: this types -> these types Change-Id: Iedacc51a6322996f423ac9472af0a597424a4fed Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed warnings from arm builds with -WundefRohan McGovern2012-03-071-3/+3
| | | | | | | | | Do not use the value of a macro before verifying that the macro is defined. Change-Id: I36bebe37da5f4e5e7af1e423b7f2b18091e35707 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove Q_BYTE_ORDER and -*-endian arguments from configuresBradley T. Hughes2012-03-021-1/+75
| | | | | | | | | | | | | | | | | | Do not write Q_BYTE_ORDER to qconfig.h in the configures. Instead, we #define Q_BYTE_ORDER in qprocessordetection.h, since many CPUs only support a single endian format. For bi-endian processors, we set Q_BYTE_ORDER depending on how the preprocessor sets __BYTE_ORDER__, __BIG_ENDIAN__, or __LITTLE_ENDIAN__ (instead of using a compile test to do so). For operating systems that only support a single byte order, we can check for Q_OS_* in addition to the preprocessor macros above. This is possible because qprocessordetection.h is included by qglobal.h after Q_OS_* and Q_CC_* detection has been done. Do this for Windows CE, which is always little- endian according to MSDN. Change-Id: I019a95e05252ef69895c4b38fbfa6ebfb6a943cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWERBradley T. Hughes2012-02-201-6/+10
| | | | | | | | | IBM's POWER and the PowerPC architecture have been merged into a single ISA, the Power ISA (see http://www.power.org). Use this unified name in Qt. Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document Q_PROCESSOR_* macrosBradley T. Hughes2012-02-181-0/+3
| | | | | | | | | | All known processors and their variants/revisions are documented. I added Q_PROCESSOR_MIPS_V based on the MIPS64 online documentation, which documents MIPS64 as a superset of MIPS IV and MIPS V. Change-Id: Ie2796d4f03499283aa2c96d60f5e37bd74a36ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove HP PA-RISC atomic implementation.Bradley T. Hughes2012-02-131-6/+0
| | | | | | | | | | | This architecture is obsolete and discontinued. Support for PA-RISC can be re-added if needed, but it would be preferred to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for example). Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove failing for ARM Architectures.Andreas Holzammer2012-02-111-2/+0
| | | | | | | | Checks cover only V7, V6 and V5. But when trying to compile for V4 it fails. Change-Id: I573361c61acc904661bf2c8bfe1132cba57f296a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add qprocessordetection.hBradley T. Hughes2012-02-081-0/+194
This detects the target processor based on preprocessor #defines, setting Q_PROCESSOR_${FAMILY} accordingly. Optional Q_PROCESSOR_${FAMILY}_${REVISION/VARIANT} #defines are also provided, usually dependent on how the compiler is invoked. Currently detected families (and variants) include: ARM (v5, v6, and v7) X86 (i386 and x86_64, as X86_32 and X86_64 respectively) IA-64 MIPS (I, II, III, IV, 32, 64) Other families that currently are not detected, but Qt has (or had) support for include: Alpha AVR32 Blackfin PA-RISC PowerPC (optional 64-bit variant) S390 (and S390X 64-bit variant) SH (and SH-4A) SPARC (SPARC V9) Detection for these is currently commented out, and can be easily enabled later. Change-Id: I571f245c189b9d80c7c3a5369ac595a271f37c8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>